Restart policy should work unless there is an other issue while the system is booting.
You could also conigure the containers as systemd services or use Kubernetes or Docker Swarm to make sure the containers are in the required state.
Newtratrip, yours is not an uncommon question. To be clear, the the Docker docs on restartpolicy indicate how that setting âcontrols whether your containers start automatically when they exit, or when Docker restartsâ (emphasis mine). So that last point is about how DOCKER ensures a container runs on Docker restart.
Your question is instead about how your OS ensures Docker runs on a server restart, and that will depend on various thingsâŠstarting with what OS youâre using (Linux, Windows, macOS, etc.), as each has its own way to control the startup of a process like Docker on reboot.
It will depend also on how you installed (and run) Docker itself.
For instance, if you may be on Windows or Mac and are using Docker Desktop, that offers a setting to âstart Docker Desktop when you log inâ (as shown in the docs for mac or win), which might suit your needs. Iâm pretty sure itâs disable by default.
If you may still have issues after reading the above, please let us know what OS youâre using and how you installed and run Docker.
âThe docker service starts automatically on Debian based distributions. On RPM based distributions, such as CentOS, Fedora, RHEL or SLES, you need to start it manually using the appropriate systemctl or service command. As the message indicates, non-root users cannot run Docker commands by default.â
Perhaps it would be better if that said, âshould start automaticallyâ, as it doesnât start for you. As for why it does not, we need to know first what mechanism on your Ubuntu 14 manages such auto-start apps, which are generically known as" services".
I need to start docker containers when starting windows 10 pro without user logon.
Previously I was able to start âC:\Program Files\Docker\Docker\Docker Desktop.exeâ with the Windows task scheduler application
Now after a new installation of windows it is not working.
Not even trying to start a powershell script that launches service and application.
Something starts and I notice it from the task manager but not the containers.
Thanks in advance for the help