How do I restart Docker containers on Windows reboot?

Viewed 34

It may sound like a known issue but the problem is that when system reboots, the containers don't start and appear to be in the Exited status. We're using docker-compose to start up the containers (in total about ~10 containers launched as a PowerShell script).

The docker documentation says to use the restart_policy but that mainly deals with container crashes. https://docs.docker.com/compose/compose-file. The restart always flag is also set in the config file and doesn't seem to help, have tried setting up the task scheduler however it's still the same issue.

I'm wondering if there's a way the containers will be started gracefully or if it could be set up in Task Scheduler?

0 Answers
Related