9

I am using Docker and its docker-compose functionalities on Windows 10.

Right now when I run the command docker-compose up -d to start some containers in the background, the containers started will be running even after rebooting my Docker-Host.

How can I prevent that? I just want them to start when I explicitly power them up.

chicks
  • 3,639
  • 10
  • 26
  • 36
Octavian
  • 211
  • 2
  • 5

1 Answers1

7

You can easily achieve this by using the following command:

docker update --restart=no my-container

Where my-container should be every container you don't want to be started when your Host (In this case W10) boots.

Carlo C.
  • 107
  • 1
  • 8
  • 1
    I found this answer in the following Stackoverflow Post: https://stackoverflow.com/questions/40513545/how-to-prevent-docker-from-starting-a-container-automatically-on-system-startup – Carlo C. May 22 '19 at 15:22