Docker Compose
Cheat sheet · https://pcornel.dk/topic.php?topic=2895
Answer
Docker Compose defines multi-container applications in a compose.yaml (services, networks, volumes, environment) and manages them with docker compose up/down/logs.
Remember
Services reach each other by service name on the project network. depends_on with healthchecks controls start order. Use .env for variables and keep secrets out of the file.
First checks
docker ps -a / podman ps -a— containers and statedocker logs <c>— container outputdocker inspect <c>— configuration, mounts, networkdocker info— engine, storage driver, cgroup version
Commands
docker compose updocker compose pull && docker compose up -ddocker compose restart apidocker compose run --rm api migratedocker compose downdocker compose down -vdocker compose configdocker inspect
Verify in this order
compose file → project network and volumes → services started in order → reachable by service name
Where it usually breaks
First mismatch in hardware/kernel capability → scheduler/mm/device → cgroup/namespace → process/thread → service/runtime → workload behavior/counters; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2895