Docker Compose Labs¶
Lab Overview¶
Welcome to the hands-on Docker Compose labs! This comprehensive series of 17 labs guides you from basic setup through advanced topics like multi-network architecture, Helm charts, live reload, reusable configuration fragments, environment-aware profiles, init containers, variable substitution, merge strategies, integration testing, secrets management, and local development workflows.
Available Labs¶
| # | Lab | Difficulty | Description |
|---|---|---|---|
| 1 | 001 - Introduction | Beginner | Install Docker Compose and understand core concepts |
| 2 | 002 - Compose Demo | Beginner | Multi-service app with web, app, and database tiers |
| 3 | 002 - Structure | Intermediate | Complete docker-compose.yml syntax reference |
| 4 | 003 - Commands | Intermediate | Master the Docker Compose CLI |
| 5 | 004 - Compose to Helm | Advanced | Package Compose apps as Helm charts for Kubernetes |
| 6 | 005 - Advanced Features | Advanced | extends, YAML anchors, and modular configs |
| 7 | 006 - Watch | Intermediate | Live reload and file synchronization |
| 8 | 007 - Networks | Advanced | Multi-network architecture with DMZ and security zones |
| 9 | 008 - Advanced Topics | Advanced | Profiles, secrets, configs, resource limits, logging, init, variable substitution, merge, include |
| 10 | 009 - Fragments | Advanced | Reusable fragments: logging, resources, healthchecks, networks, secrets, security, profiles |
| 11 | 010 - Profiles | Intermediate | Environment-aware service management with Docker Compose profiles |
| 12 | 011 - Init Containers | Advanced | Startup orchestration with init containers and healthcheck chains |
| 13 | 012 - Variable Substitution | Intermediate | Environment variable substitution, defaults, and mandatory values |
| 14 | 013 - Merge & Override | Intermediate | Multi-file merge strategies and override patterns |
| 15 | 014 - Integration Testing | Advanced | Automated integration testing with Compose exit codes |
| 16 | 015 - Secrets & Configs | Advanced | Secure secrets and configuration management |
| 17 | 016 - Dev Workflows | Intermediate | Local development hot-reload, profiles, and CI pipelines |
Learning Paths¶
Beginner Path¶
Start here if you’re new to Docker Compose:
Intermediate Path¶
For those comfortable with Docker Compose basics:
- Lab 003: Commands
- Lab 006: Watch
- Lab 012: Variable Substitution
- Lab 013: Merge & Override
- Lab 016: Dev Workflows
Advanced Path¶
For experienced engineers:
- Lab 004: Compose to Helm
- Lab 005: Advanced Features
- Lab 007: Networks
- Lab 008: Advanced Topics
- Lab 009: Fragments
- Lab 010: Profiles
- Lab 011: Init Containers
- Lab 014: Integration Testing
- Lab 015: Secrets & Configs
Tips for Success¶
- Take your time: Don’t rush through the labs - understanding beats speed
- Experiment: Modify the compose files and observe the changes
- Break and fix: Intentionally break a service, then debug using
docker compose logs - Read the config: Use
docker compose configto see the resolved configuration - Clean up: Always run
docker compose downafter each lab
Get Started¶
Ready to begin? Start with Lab 001: Introduction!