June 5, 20224 yr I am currently running docker containers using docker-compose through ansible. Whenever I reboot Unraid, my containers do not restart automatically. I am using "restart: unless-stopped". I switch one of the container to use "restart: always" and this one starts on reboot. Is there a reason why unless-stopped is not honored?
June 5, 20224 yr Solution Because part of the process in rebooting or powering off is stopping the container. Therefore it doesn't meet the criteria of "restart unless stopped", and since it's via docker compose it's outside of the control of the OS' GUI and the autostart flag.
June 5, 20224 yr Author Is that a limitation on how docker is implemented on Unraid? Other OS I have worked with will stop the containers on reboot, but will not mark them as stopped in docker, unless-stopped being reserved for when a user specifically stops a container.
June 5, 20224 yr Author Ok, I went back to the docker documentation and unless-stopped should not restart containers when the daemon restart. So Unraid implementation is correct. Not sure why my Ubuntu server restart them though. Thanks!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.