Lesson 19 / 28

Why Compose?

Define multi-container apps such as an API, database and cache in one file and run them with one command.

One YAML instead of many commands

Most real apps need several containers — an API, a database, a cache. Docker Compose lets you describe them all in one YAML file instead of typing out long docker run commands and manually wiring networks.