r/unifi: Switching to custom container image

The _linuxserver.io_ image for UniFi Network is deprecated.  It sucked
anyway.  I've created a simple image based on Debian that installs the
_unifi_ package from the upstream apt repository.  This image doesn't
require running anything as _root_, so it doesn't need a user namespace.
This commit is contained in:
2025-02-12 06:47:37 -06:00
parent a423826fcd
commit db54b03aa8
4 changed files with 13 additions and 50 deletions

View File

@@ -5,14 +5,17 @@ After=network.target
[Container]
Image={{ unifi_container_image }}:{{ unifi_version }}
Volume={{ unifi_storage_path }}:/config:rw,Z
Volume=%S/%N:/var/lib/unifi:rw,U,Z
Volume=%L/%N:/var/log/unifi:rw,U,Z
Network=host
NoNewPrivileges=yes
UserNS=auto:gidmapping=911:911:1,uidmapping=911:911:1
VolatileTmp=yes
ReadOnly=yes
ReadOnlyTmpfs=true
Notify=yes
[Service]
StateDirectory=%N
LogsDirectory=%N
TimeoutStartSec=5min
Restart=always
PrivateTmp=yes
@@ -23,7 +26,7 @@ ProtectProc=invisible
ProtectSystem=strict
ReadWritePaths=/run
ReadWritePaths=/var/lib/containers/storage
ReadWritePaths={{ unifi_storage_path }}
ReadWritePaths=%S/%N
RestrictRealtime=yes
UMask=0077