Docker 29 cheatsheet
Docker 29: Docker Compose
8 common Docker 29 tasks.
Start the services
Build if needed and start everything in compose.yaml in the background.
docker compose up -d
Stop and remove the services
Stop and remove the containers and networks. Volumes are kept.
docker compose down
Stop and remove services and volumes
Also delete the named volumes declared in the file.
docker compose down -v
Caution: Deletes the volumes' data, such as a database.
Open a shell in a service
Run a shell inside a running service container.
docker compose exec web sh
Check the merged config
Validate the file and print it with variables and overrides applied.
docker compose config