Skip to content

@tank/docker-compose-cheatsheet

1.0.0

Description

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-cheatsheet

Docker Compose Cheat Sheet

Core Philosophy

  1. Optimize for local workflows — Compose is most valuable when it shortens the path to a working multi-service environment.
  2. Keep service definitions readable — A cheat sheet should surface the fields engineers reach for most often.
  3. Separate lifecycle commands from YAML syntax — Operators and authors need both, but not mixed chaotically.
  4. Prefer explicit dependencies and healthchecks — Most Compose confusion comes from startup timing and hidden environment coupling.
  5. 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?"

  1. docker compose up -d
  2. docker compose up --build
  3. docker compose down -> See references/commands-and-yaml.md

"How do I inspect logs or enter a service?"

NeedCommand
logsdocker compose logs -f <service>
shelldocker compose exec <service> sh
one-off commanddocker compose run --rm <service> <cmd>
-> See references/commands-and-yaml.md

Decision Trees

SignalFocus area
need lifecycle controlup, down, ps, logs, exec
need service definition helpservice fields, env, volumes, networks
need optional servicesprofiles
need startup orderingdepends_on + healthchecks

Reference Index

FileContents
references/commands-and-yaml.mdDocker Compose commands, core YAML fields, service patterns, healthchecks, networks, volumes, profiles, and common dev workflows

Command Palette

Search skills, docs, and navigate Tank