Containers · Docker & Compose Operations
Docker Compose Basics
Cheat sheet · https://pcornel.dk/topic.php?topic=6137
Answer
Docker Compose defines services, networks and volumes in compose.yaml and runs them together with docker compose.
Remember
Services resolve each other by name. Use .env for variables and depends_on with healthchecks. docker compose config shows the merged result.
First checks
docker compose config— merged configurationdocker ps -a— containers and exit codesdocker logs <c>— container outputdocker inspect <c>— config, mounts, network, state
Commands
docker compose up -ddocker compose psdocker compose logs -f apidocker compose downdocker compose config
Verify in this order
compose.yaml → network + volumes → services
Where it usually breaks
depends_on without a health condition only orders startup; it does not wait for readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6137