@tank/docker-compose-cheatsheet
1.0.0Description
Docker Compose cheat sheet covering commands, compose YAML, services, networks, volumes, profiles, healthchecks, build vs image, and common development workflows..
Download
Verified
tank install @tank/docker-compose-cheatsheetDocker Compose Cheat Sheet
Core Philosophy
- Optimize for local workflows — Compose is most valuable when it shortens the path to a working multi-service environment.
- Keep service definitions readable — A cheat sheet should surface the fields engineers reach for most often.
- Separate lifecycle commands from YAML syntax — Operators and authors need both, but not mixed chaotically.
- Prefer explicit dependencies and healthchecks — Most Compose confusion comes from startup timing and hidden environment coupling.
- Profiles and overrides are leverage — They keep one Compose setup usable across dev, test, and optional services.
Quick-Start: Common Problems
"How do I start or rebuild everything?"
docker compose up -ddocker compose up --builddocker compose down-> Seereferences/commands-and-yaml.md
"How do I inspect logs or enter a service?"
| Need | Command |
|---|---|
| logs | docker compose logs -f <service> |
| shell | docker compose exec <service> sh |
| one-off command | docker compose run --rm <service> <cmd> |
-> See references/commands-and-yaml.md |
Decision Trees
| Signal | Focus area |
|---|---|
| need lifecycle control | up, down, ps, logs, exec |
| need service definition help | service fields, env, volumes, networks |
| need optional services | profiles |
| need startup ordering | depends_on + healthchecks |
Reference Index
| File | Contents |
|---|---|
references/commands-and-yaml.md | Docker Compose commands, core YAML fields, service patterns, healthchecks, networks, volumes, profiles, and common dev workflows |