Docker restart unless-stopped not honored?


Go to solution Solved by Squid,

Recommended Posts

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?

 

 

 

Link to comment
  • 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.

Link to comment

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. 

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.