A free, self-paced textbook in 8 chapters. Read a chapter, then drill it with the 217 companion flashcards using spaced repetition.
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...
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]...
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...
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...
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...
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...
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....
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...