Docker Tip #45: Docker Compose Stop vs Down
You can stop your containers using the stop or down command, but the down command does more than stopping your containers.
docker-compose stop command will stop your containers, but it won’t remove them.
docker-compose down command will stop your containers, but it also removes the stopped containers as well as any networks that were created.
You can take
down 1 step further and add the
-v flag to remove all volumes too. This is great for doing a full blown reset on your environment by running
docker-compose down -v.
There’s other neat things you could with the
down command. Run the
docker-compose down --help command to learn more about them.