Repaso
EspaƱol
Cloud & DevOpsCoreOPS-08

What is Docker Compose mainly used for?

Options

  1. Orchestrating production clusters across many separate hosts
  2. Running multi-container apps from one YAML file, mostly in dev (Correct option)
  3. Building images faster by sharing a remote cache between many hosts
  4. Replacing Kubernetes in every production environment of a company

Answer

Defining and running multi-container setups (app, DB, cache) from one YAML file, typically for local dev and CI

Why

A real app often needs several containers: your API, PostgreSQL, Redis, a worker. Starting each by hand is tedious.

With Compose you describe all of them, plus their ports, volumes and environment variables, in docker-compose.yml, and start everything with docker compose up.

For production across many machines, Kubernetes or a managed container service is more common.

Remember

Compose = many containers, one file, one command.

Key terms

Practice this question in Repaso