Stop and remove a Docker Compose stack
docker compose down | stop docker compose stack | shut down compose project keep data | docker | compose | stopCaution: This command changes the system. Understand what it does before you run it.
docker compose -f /opt/app/compose.yaml downShuts down the complete stack and removes the containers as well as the networks created by the project. Named volumes are kept, so a later docker compose up -d starts with the existing data.
Note: Data that only existed in a container’s writable layer is lost. To just pause, use docker compose stop, which keeps the containers.
Also searched as
- docker compose down
- stop docker compose stack
- shut down compose project keep data