External Publication
Visit Post

Docker Compose

Sahil Kapoor's Playbook May 12, 2026
Source

Docker Compose is a tool for defining and running multi-container applications on a single host using a declarative YAML file. It is the standard way to spin up a local development environment with a database, a cache, the application server, and any other supporting services in one command.

How it works

A docker-compose.yml (or compose.yaml) file declares services, networks, volumes, and configuration. Each service describes one container (image, command, ports, environment, volumes, depends_on, healthcheck). Running docker compose up pulls images, creates the declared resources, starts containers in dependency order, and streams logs to the terminal.

Common features

  • Profiles. Mark services as belonging to optional profiles, started only when explicitly requested.
  • Environment files. .env files supply variables for substitution in compose.yaml.
  • Healthchecks and dependencies. Wait for one service to be healthy before starting another.
  • Override files. Compose merges compose.yaml with compose.override.yaml, useful for per-developer customisation.
  • Watch mode. Live-rebuild services on file changes during development.

Compose vs Kubernetes

Compose is for a single host and dev or simple staging environments. Kubernetes is for multi-host clusters in production. Compose specifications and Kubernetes manifests are not interchangeable but tools like Kompose can translate between them.

๐Ÿ”—

Related Terms Docker, Kubernetes, containerd, OCI.

Discussion in the ATmosphere

Loading comments...