docker-compose down and stop

Premise

docker-compose down and docker-compose stop I will write about the difference because it was fluffy.

Main subject

down down deletes the container network volume image created by up.

option
  --Delete rmi hoge image.
The hoge part is one of the following.
                        'all':Delete all images used by all services.
                        'local':Delete only images that do not have a custom tag in the image field.
   -v, --volumes Compose file`volumes`Delete named volume in section.
Also, the anonymous volume attached to the container has been deleted.
   --remove-Remove containers for services not defined in the orphans Compose file.

stop stop stops a running container, but does not delete it. Reboot with the docker-compose start command.

option
-t, --timeout TIMEOUT Specifies the number of shutdown timeout seconds(The default is 10)。

reference

https://docs.docker.com/compose/reference/down/ https://docs.docker.com/compose/reference/stop/

Recommended Posts

docker-compose down and stop
Stop Service and timer
Install docker and docker-compose on Alpine Linux
docker-compose Rebuild and start Only one container
Build and manage RStudio environment with Docker-compose
Try running MySql and Blazor with docker-compose
Note: [Docker] How to start and stop
How to write and explain Dockerfile, docker-compose