Hey everyone! I'm trying to get Docker Desktop to automatically start a few containers when my computer boots up. I tried setting the `restart always` option, but it hasn't worked out for me. Any advice on how to set this up properly?
3 Answers
It would help to know what operating system you're using. If you're on Windows, you have to make sure Docker Desktop is added to your startup programs. That way it can start up your containers with the restart policy on boot.
Here’s an example of the `docker run` command that I generated: it includes the essential restart setting. Just double-check your command to ensure the `--restart` flag is set to `always`. If it’s showing `--restart=no`, that might be the issue. Adjust that in your script.
If you're running on Linux, you can use Docker CLI commands or Docker Compose to set your containers to restart always. Just make sure to run the appropriate commands in your startup scripts.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures