About this chapter
Typing long docker commands for every container gets old fast. Docker Compose lets you define your whole app in one file and start it with a single command.
Lessons from courses
- 1 What is Docker Compose? What is Docker Compose? Learn how it describes a multi-container app in a single docker-compose.yml file you start with one command.
- 2 Writing a docker-compose.yml Write your first docker-compose.yml: define a service with an image and ports, then start it with docker compose up and stop it with down.
- 3 Multi-container apps Run a multi-container app with Docker Compose: define several services in docker-compose.yml with automatic networking, volumes and env vars.
- 4 Building images and using variables Build your own image in Docker Compose, load variables from a .env file, and control startup order with depends_on between services.