Docker Compose
Part of the Docker course
By now, starting a realistic application takes four commands and none of them are short. Create a network. Create a volume. Start the database with its environment variables and its volume and its network. Start the web server with its network and its published port, in that order, because the database has to exist first.
You will get one of them wrong. Then you will write them into a shell script, and the script will drift out of date, and a new colleague will run it against a machine where the volume already exists with different contents. This is not a hypothetical progression; it is what every team does before they find the tool that fixes it.
Want to learn Docker Docker Compose in a real environment?
Click below, get a fresh Linux box with Docker ready to go, and work through Docker Compose hands-on with an AI tutor that knows your code.
Start this lessonDocker ComposeWhat you'll learn
- Compose.yaml
- Services
- Depends_on
- Port mapping
- Docker compose up/down
- Named volumes in compose
Read this lesson in your language
All lessons in this course
13 lessons- 1What Is Docker20 min
- 2Your First Container25 min
- 3Images and the Dockerfile30 min
- 4Building Custom Images35 min
- 5Container Networking30 min
- 6Volumes and Persistence30 min
- 7Docker Compose35 min
- 8Multi-Stage Builds35 min
- 9Environment Variables and Secrets25 min
- 10Healthchecks and Restart Policies25 min
- 11Image Optimization and Security30 min
- 12Registries and Publishing25 min
- 13Capstone: Shipping a Stack50 min
