How to prevent docker from starting a container automatically on system startup?
Docker will autostart any container with a RestartPolicy of ‘always’ when the docker service initially starts. You won’t find any evidence of this within cron or any other normal system startup scripts; 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.
docker update --restart=no my-container
- Docker: Launching a Container from an Image
- How to delete all local Docker images?
- How to install docker on debian 10 /11 ( buster / bullseye )
- Install Drupal 8 in a Docker Container
- Install redmine via docker-compose