1. Compose File Anatomy
A Docker Compose file is a YAML document that describes a multi-container application. In Compose v2, the modern format no longer requires a top-level version: field; the schema is...
Read full chapter →The essential Docker Compose Recipes For Local Dev cheat sheet: 8 concise chapters you can read in minutes, distilled from the full deck. When you're ready, drill the flashcards or test yourself under exam conditions.
A Docker Compose file is a YAML document that describes a multi-container application. In Compose v2, the modern format no longer requires a top-level version: field; the schema is...
Read full chapter →The depends_on: key controls the order in which Compose starts services, but it has a sharp edge that catches almost everyone the first time. The short form depends_on: [db, redis]...
Read full chapter →Compose supports three flavors of persistent storage, and choosing the right one matters. A bind mount maps a host path into the container, written as ./local:/app, with optional r...
Read full chapter →Every Compose project gets a default network named <project>_default, and on that network services can resolve each other by service name. That name resolution is what makes...
Read full chapter →The build: key tells Compose how to construct an image for a service. The simplest form is just a path to a directory containing a Dockerfile, but a richer form lets you specify th...
Read full chapter →One of Compose's most powerful features is the ability to split a configuration across multiple files and merge them. The conventional layout is a base docker-compose.yml containin...
Read full chapter →Debugging a Compose project starts with the docker compose ps command, which shows the status of every service, and the docker compose logs command, which prints container output....
Read full chapter →For Postgres, the canonical Compose service sets POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB environment variables to create a database on first run, mounts a named volume on...
Read full chapter →Done reading?
Test yourself with the Docker Compose Recipes For Local Dev practice exam — timed questions, instant score, full review of wrong answers. Free.
🎯 Take the Practice Exam →