← Docker learning path
Docker · Module 7 of 10

Docker Compose

Compose starts a whole multi-container app from one file.

📖 Key ideas

  1. compose.yaml describes services, their images or builds, ports, volumes and environment.
  2. docker compose up -d starts everything; docker compose down stops it.
  3. Services reach each other by service name on a shared network Compose creates.
  4. depends_on sets start order (but not readiness).
  5. Great for local development and small deployments.
💡 Real-life example: Compose is the band leader: one signal and the drums, guitar and singer all start together.
compose.yamlFile that defines the app services
ServiceOne container definition in Compose
docker compose upStarts all services
depends_onSets service start order