In Docker for Windows How do I stop containers from automatically starting on the daemon start

0 votes
Every time my Docker for Windows daemon boots up, it will start a few containers. Even after I kill a container and then reboot the docker daemon, it still appears.

Can someone help me with this?
Sep 3, 2018 in Docker by Sophie may
• 10,610 points

2 answers to this question.

0 votes

I’m not quite sure as to why this happens but maybe those containers have a restart policy which will make Docker to run them everytime they’re not there?

Anyhow, try this:

If youre containers are running, before killing them, try this:

docker update --restart=no container1 container2 ....

Then reboot and see if those containers are still running.

answered Sep 3, 2018 by Sophie may
• 10,610 points
0 votes

Docker will autostart any container with a RestartPolicy of 'always' when the docker service initially starts. You'll have to dig into the container configuration to find it.

docker inspect my-container (Look for RestartPolicy in the output)

I've mostly had this situation occur when a container was created with --restart always, and the situation later changed such that I no longer wanted this to happen.

After docker 1.11, this is easy to fix

docker update --restart=no my-container
answered Aug 14, 2019 by Sirajul
• 59,230 points

Related Questions In Docker

0 votes
0 answers

How do I actually install Docker on Windows 8.1? (Docker Toolbox for Windows 8.1 was deprecated recently)

So I have been advised something like ...READ MORE

Apr 21, 2022 in Docker by pranav
• 2,590 points
0 votes
1 answer

How do I connect to my docker VM from windows shell?

You can run a container with full ...READ MORE

answered Sep 5, 2018 in Docker by Tyrion anex
• 8,700 points
0 votes
1 answer
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,090 points
0 votes
2 answers

How do I fix the “no space left on device” error in docker?

Try cleaning up: $ docker volume rm $(docker ...READ MORE

answered Aug 14, 2019 in Docker by Sirajul
• 59,230 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP