I run into the same issue w/ the other popular Docker image for Unfi Controller (linuxserver/unifi-controller).
unifi:
image: lscr.io/linuxserver/unifi-controller:7.1.61
environment:
- "PUID=1000"
- "PGID=1000"
- "MEM_LIMIT=1024"
- "MEM_STARTUP=1024"
hostname: "unifi.mydomain.com"
labels:
- "traefik.enable=true"
- "traefik.http.routers.unifi.entrypoints=websecure"
- "traefik.http.routers.unifi.rule=Host(`unifi.mydomain.com`)"
- "traefik.http.services.unifi.loadbalancer.server.scheme=https"
- "traefik.http.services.unifi.loadbalancer.server.port=8443"
ports:
- "3478:3478/udp"
- "6789:6789/tcp"
- "8080:8080/tcp"
- "10001:10001/udp"
volumes:
- "unifi_config:/config"
volumes:
unifi_config:
[Logs] [5/6/2022, 8:02:02 PM] Installing service 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
[Logs] [5/6/2022, 8:02:02 PM] Installed service 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
[Logs] [5/6/2022, 8:02:02 PM] Starting service 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
[Logs] [5/6/2022, 8:02:05 PM] Started service 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [s6-init] ensuring user provided files have correct perms...exited 0.
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [fix-attrs.d] applying ownership & permissions fixes...
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [fix-attrs.d] done.
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [cont-init.d] executing container initialization scripts...
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [cont-init.d] 01-envfile: executing...
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [cont-init.d] 01-envfile: exited 0.
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [cont-init.d] 01-migrations: executing...
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [migrations] started
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [migrations] no migrations found
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [cont-init.d] 01-migrations: exited 0.
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [cont-init.d] 02-tamper-check: executing...
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [cont-init.d] 02-tamper-check: exited 0.
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [cont-init.d] 10-adduser: executing...
[Logs] [5/6/2022, 8:02:05 PM] [unifi]
[Logs] [5/6/2022, 8:02:05 PM] [unifi] -------------------------------------
[Logs] [5/6/2022, 8:02:05 PM] [unifi] _ ()
[Logs] [5/6/2022, 8:02:05 PM] [unifi] | | ___ _ __
[Logs] [5/6/2022, 8:02:05 PM] [unifi] | | / __| | | / \
[Logs] [5/6/2022, 8:02:05 PM] [unifi] | | \__ \ | | | () |
[Logs] [5/6/2022, 8:02:05 PM] [unifi] |_| |___/ |_| \__/
[Logs] [5/6/2022, 8:02:05 PM] [unifi]
[Logs] [5/6/2022, 8:02:05 PM] [unifi]
[Logs] [5/6/2022, 8:02:05 PM] [unifi] Brought to you by linuxserver.io
[Logs] [5/6/2022, 8:02:05 PM] [unifi] -------------------------------------
[Logs] [5/6/2022, 8:02:05 PM] [unifi]
[Logs] [5/6/2022, 8:02:05 PM] [unifi] To support LSIO projects visit:
[Logs] [5/6/2022, 8:02:05 PM] [unifi] https://www.linuxserver.io/donate/
[Logs] [5/6/2022, 8:02:05 PM] [unifi] -------------------------------------
[Logs] [5/6/2022, 8:02:05 PM] [unifi] GID/UID
[Logs] [5/6/2022, 8:02:05 PM] [unifi] -------------------------------------
[Logs] [5/6/2022, 8:02:05 PM] [unifi]
[Logs] [5/6/2022, 8:02:05 PM] [unifi] User uid: 1000
[Logs] [5/6/2022, 8:02:05 PM] [unifi] User gid: 1000
[Logs] [5/6/2022, 8:02:05 PM] [unifi] -------------------------------------
[Logs] [5/6/2022, 8:02:05 PM] [unifi]
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [cont-init.d] 10-adduser: exited 0.
[Logs] [5/6/2022, 8:02:05 PM] [unifi] [cont-init.d] 15-install: executing...
[Logs] [5/6/2022, 8:02:05 PM] [unifi] *** installing unifi packages ***
[Logs] [5/6/2022, 8:02:05 PM] [unifi] Selecting previously unselected package unifi.
(Reading database ... 8986 files and directories currently installed.)
[Logs] [5/6/2022, 8:02:05 PM] [unifi] Preparing to unpack /app/unifi.deb ...
[Logs] [5/6/2022, 8:02:06 PM] [unifi] Unpacking unifi (7.1.61-17860-1) ...
[Logs] [5/6/2022, 8:02:06 PM] Killing service 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
[Logs] [5/6/2022, 8:02:06 PM] [unifi] [cont-finish.d] executing container finish scripts...
[Logs] [5/6/2022, 8:02:06 PM] [unifi] [cont-finish.d] done.
[Logs] [5/6/2022, 8:02:06 PM] [unifi] [s6-finish] waiting for services.
[Logs] [5/6/2022, 8:02:07 PM] [unifi] [s6-finish] sending all processes the TERM signal.
[Logs] [5/6/2022, 8:02:10 PM] [unifi] [s6-finish] sending all processes the KILL signal and exiting.
[Logs] [5/6/2022, 8:02:11 PM] Service exited 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
[Logs] [5/6/2022, 8:02:11 PM] Killed service 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
[Logs] [5/6/2022, 8:02:12 PM] Installing service 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
[Logs] [5/6/2022, 8:02:12 PM] Installed service 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
[Logs] [5/6/2022, 8:02:12 PM] Starting service 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
[Logs] [5/6/2022, 8:02:15 PM] Started service 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [s6-init] ensuring user provided files have correct perms...exited 0.
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [fix-attrs.d] applying ownership & permissions fixes...
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [fix-attrs.d] done.
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [cont-init.d] executing container initialization scripts...
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [cont-init.d] 01-envfile: executing...
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [cont-init.d] 01-envfile: exited 0.
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [cont-init.d] 01-migrations: executing...
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [migrations] started
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [migrations] no migrations found
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [cont-init.d] 01-migrations: exited 0.
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [cont-init.d] 02-tamper-check: executing...
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [cont-init.d] 02-tamper-check: exited 0.
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [cont-init.d] 10-adduser: executing...
[Logs] [5/6/2022, 8:02:15 PM] [unifi]
[Logs] [5/6/2022, 8:02:15 PM] [unifi] -------------------------------------
[Logs] [5/6/2022, 8:02:15 PM] [unifi] _ ()
[Logs] [5/6/2022, 8:02:15 PM] [unifi] | | ___ _ __
[Logs] [5/6/2022, 8:02:15 PM] [unifi] | | / __| | | / \
[Logs] [5/6/2022, 8:02:15 PM] [unifi] | | \__ \ | | | () |
[Logs] [5/6/2022, 8:02:15 PM] [unifi] |_| |___/ |_| \__/
[Logs] [5/6/2022, 8:02:15 PM] [unifi]
[Logs] [5/6/2022, 8:02:15 PM] [unifi]
[Logs] [5/6/2022, 8:02:15 PM] [unifi] Brought to you by linuxserver.io
[Logs] [5/6/2022, 8:02:15 PM] [unifi] -------------------------------------
[Logs] [5/6/2022, 8:02:15 PM] [unifi]
[Logs] [5/6/2022, 8:02:15 PM] [unifi] To support LSIO projects visit:
[Logs] [5/6/2022, 8:02:15 PM] [unifi] https://www.linuxserver.io/donate/
[Logs] [5/6/2022, 8:02:15 PM] [unifi] -------------------------------------
[Logs] [5/6/2022, 8:02:15 PM] [unifi] GID/UID
[Logs] [5/6/2022, 8:02:15 PM] [unifi] -------------------------------------
[Logs] [5/6/2022, 8:02:15 PM] [unifi]
[Logs] [5/6/2022, 8:02:15 PM] [unifi] User uid: 1000
[Logs] [5/6/2022, 8:02:15 PM] [unifi] User gid: 1000
[Logs] [5/6/2022, 8:02:15 PM] [unifi] -------------------------------------
[Logs] [5/6/2022, 8:02:15 PM] [unifi]
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [cont-init.d] 10-adduser: exited 0.
[Logs] [5/6/2022, 8:02:15 PM] [unifi] [cont-init.d] 15-install: executing...
[Logs] [5/6/2022, 8:02:15 PM] [unifi] *** installing unifi packages ***
[Logs] [5/6/2022, 8:02:16 PM] [unifi] Selecting previously unselected package unifi.
(Reading database ... 8986 files and directories currently installed.)
[Logs] [5/6/2022, 8:02:16 PM] [unifi] Preparing to unpack /app/unifi.deb ...
[Logs] [5/6/2022, 8:02:16 PM] Killing service 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
[Logs] [5/6/2022, 8:02:16 PM] [unifi] Unpacking unifi (7.1.61-17860-1) ...
[Logs] [5/6/2022, 8:02:16 PM] [unifi] [cont-finish.d] executing container finish scripts...
[Logs] [5/6/2022, 8:02:16 PM] [unifi] [cont-finish.d] done.
[Logs] [5/6/2022, 8:02:16 PM] [unifi] [s6-finish] waiting for services.
[Logs] [5/6/2022, 8:02:17 PM] [unifi] [s6-finish] sending all processes the TERM signal.
[Logs] [5/6/2022, 8:02:20 PM] [unifi] [s6-finish] sending all processes the KILL signal and exiting.
[Logs] [5/6/2022, 8:02:21 PM] Service exited 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
[Logs] [5/6/2022, 8:02:21 PM] Killed service 'unifi sha256:d72d9197dfc1f4df62f6655733925648096432852b5f7d367630614247f94f36'
When I inspect the volume and find the mountpoint, I see it’s empty, which seems suspicious.
When I SSH into balenaOS, stop resin-supervisor (systemctl stop resin-supervisor) to prevent the crash loop, and start a container manually, it seems to run fine. And even writes files to the volume.
balena run \
-e PUID=1000 \
-e PGID=1000 \
-e MEM_LIMIT=1024 \
-e MEM_STARTUP=1024 \
-p 3478:3478/udp \
-p 6789:6789 `#optional` \
-p 8880:8880 `#optional` \
-p 10001:10001/udp \
-v /var/lib/docker/volumes/1_unifi_config/_data:/config \
local_image_unifi
So maybe the issue is with resin-supervisor starting the container?