Intermediate Containers & Virtualization #docker-compose#compose-services#depends-on

Docker Compose Vocabulary

5 exercises — Master the English vocabulary of Docker Compose: file structure, service dependencies, secrets management, volume types, and override patterns.

0 / 5 completed
Quick reference: Docker Compose vocabulary
  • Top-level keys — services (required), networks, volumes
  • depends_on condition: service_healthy — waits for health check to pass, not just container start
  • env_file + .gitignore — standard pattern for dev secrets; never inline in environment: block
  • Named volume — persistent, Docker-managed; bind mount — host path, for dev live-reload
  • docker-compose.override.yml — automatically merged; holds dev-only differences from the base file
1 / 5

A developer asks: "What are the three primary top-level sections in a docker-compose.yml file, and what does each define?"

Which answer is correct?