Hi
I’m using balenaOS 2.32.0+rev2 development build.
I’ve got a problem where my containers are stuck in a loop and are continuously restarting
[Logs] [2019-4-16 17:27:21] Installed service ‘nginx sha256:295c7be079025306c4f1d65997fcf7adb411c88f139ad1d34b537164aa060369’
[Logs] [2019-4-16 17:27:21] Starting service ‘nginx sha256:295c7be079025306c4f1d65997fcf7adb411c88f139ad1d34b537164aa060369’
[Logs] [2019-4-16 17:27:21] Started service ‘nginx sha256:295c7be079025306c4f1d65997fcf7adb411c88f139ad1d34b537164aa060369’
[Logs] [2019-4-16 17:27:22] Killing service ‘nginx sha256:295c7be079025306c4f1d65997fcf7adb411c88f139ad1d34b537164aa060369’
[Logs] [2019-4-16 17:27:23] Service exited ‘nginx sha256:295c7be079025306c4f1d65997fcf7adb411c88f139ad1d34b537164aa060369’
[Logs] [2019-4-16 17:27:23] Killed service ‘nginx sha256:295c7be079025306c4f1d65997fcf7adb411c88f139ad1d34b537164aa060369’
[Logs] [2019-4-16 17:27:23] Installing service ‘nginx sha256:295c7be079025306c4f1d65997fcf7adb411c88f139ad1d34b537164aa060369’
[Logs] [2019-4-16 17:27:23] Installed service ‘nginx sha256:295c7be079025306c4f1d65997fcf7adb411c88f139ad1d34b537164aa060369’
[Logs] [2019-4-16 17:27:23] Starting service ‘nginx sha256:295c7be079025306c4f1d65997fcf7adb411c88f139ad1d34b537164aa060369’
[Logs] [2019-4-16 17:27:24] Started service ‘nginx sha256:295c7be079025306c4f1d65997fcf7adb411c88f139ad1d34b537164aa060369’
[Logs] [2019-4-16 17:27:25] Killing service ‘nginx sha256:295c7be079025306c4f1d65997fcf7adb411c88f139ad1d34b537164aa060369’
[Logs] [2019-4-16 17:27:25] Service exited ‘nginx sha256:295c7be079025306c4f1d65997fcf7adb411c88f139ad1d34b537164aa060369’
[Logs] [2019-4-16 17:27:25] Killed service ‘nginx sha256:295c7be079025306c4f1d65997fcf7adb411c88f139ad1d34b537164aa060369’
I’ve simplified my docker-compose.yml file down to this (I don’t think my issue is related to not using a balena base image, I’m using an x86 machine)
version: ‘2.1’
networks: {}
volumes:
resin-data: {}
services:
nginx:
image: nginx:1.14.2
ports:
- “80:80”
Looking at the journalctl output for resin-supervisor, shows these messages being logged every few seconds:
Apr 16 16:28:02 25171d6 resin-supervisor[1907]: Replacing container for service nginx because of config changes:
Apr 16 16:28:02 25171d6 resin-supervisor[1907]: Array Fields: expose
Apr 16 16:28:02 25171d6 resin-supervisor[1907]: Replacing container for service nginx because of config changes:
Apr 16 16:28:02 25171d6 resin-supervisor[1907]: Array Fields: expose
Apr 16 16:28:02 25171d6 resin-supervisor[1907]: Replacing container for service nginx because of config changes:
Apr 16 16:28:02 25171d6 resin-supervisor[1907]: Array Fields: expose
I don’t think that this is environment variable related, because if I remove the “ports” block from my docker-compose.yml file, then the container starts up OK and doesn’t get restarted.
If I do this then I’m not sure how to forward ports into the container?
Is this a known issue? Does anyone have any ideas?
Thanks!