Skip to content
Advertisement

Docker manager autostarting containers [closed]

Docker daemon autostarts some services on my machine whenever it boots up. How do I manage the list of services to be started automatically by the docker daemon?

Advertisement

Answer

Running docker containers have a restart policy to them. This is given to it by when running them and can be seen in the container metadata You can check if your services have them by

docker inspect <container_name>

Docker currently has four restart policies:

  1. no
  2. on-failure
  3. unless-stopped
  4. always

You can choose to update it for a running service by :

docker update --restart=no <container_name>

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement