Hey there! I'm trying to figure out how to make Docker Desktop start some containers automatically when my computer boots up. I thought setting the restart policy to 'always' would do the trick, but it's not working for me. Any advice on what I might be missing?
2 Answers
If you're on Linux, you can manage this with standard Docker CLI commands or Docker Compose. Setting the restart policy to 'always' should work, so double check that you're applying it correctly when you run your container.
It would help to know what operating system you're using. If you're on Windows, you’ll need to add Docker Desktop to your startup programs. That way, it should start your containers according to the restart policy you've set.
I'm actually using Linux Mint. The desktop starts up fine, but the containers don’t launch automatically.
Here's the command that's being generated for my container: `docker run --hostname=... --restart=no ...` It looks like the restart policy is being ignored.