PierreT Posted June 5, 2022 Share Posted June 5, 2022 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? Quote Link to comment
Solution Squid Posted June 5, 2022 Solution Share Posted June 5, 2022 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. Quote Link to comment
PierreT Posted June 5, 2022 Author Share Posted June 5, 2022 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. Quote Link to comment
PierreT Posted June 5, 2022 Author Share Posted June 5, 2022 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! Quote Link to comment
Recommended Posts
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.