How can I set Docker Desktop to start containers automatically on boot?

0
1
Asked By TechieNinja42 On

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

Answered By LinuxWizard99 On

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.

TechieNinja42 -

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.

Answered By SmartDockerDude On

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.

TechieNinja42 -

I'm actually using Linux Mint. The desktop starts up fine, but the containers don’t launch automatically.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.