How learnwithdevopsengineer3682/docker-home-lab-series works
1. This repository is a training/course monorepo, not a single application. Its top-level architecture is a set of 10 self-contained episode folders, each demonstrating one Docker topic with its own runnable example(s), documentation, labs, and interview Q&A.
2. The repo is split into two major layers:
- curriculum/content layer: README.md, episode README.md, LABS.md, LABS-ANSWERS.md, INTERVIEW.md, INTERVIEW-ANSWERS.md
- executable demo layer: Dockerfiles, Compose files, Flask apps, Nginx config, shell walkthroughs, and CI workflow files
3. The reusable application pattern across episodes is a small Flask service. Several episodes contain a Python app plus requirements.txt and a Dockerfile, showing how the same app evolves through containerization, networking, persistence, security hardening, and production setup.
4. The learning progression is architectural: each episode isolates one concern and adds another layer on top of the previous one. The flow goes from basic container usage, to image construction, to container networking, to storage persistence, to failure handling, to multi-container orchestration, to optimization and security, and finally to CI/CD and a production-like stack.
5. The main runtime technology is Docker. The examples focus on container lifecycle, image layers, volumes, networks, restart behavior, healthchecks, and container isolation. The course structure makes Docker itself the platform boundary rather than any single application framework.
6. Networking is a key subsystem in the mid-to-late episodes. EP3-docker-networking, EP6-Docker-compose, and EP10-Real-world introduce multi-container communication patterns, especially Flask talking to Postgres and Nginx acting as a reverse proxy in front of the app.
7. Persistence is treated as a separate subsystem from the application. EP4-Persistent-Volumes and later compose-based episodes emphasize the difference between ephemeral container storage and durable data storage via named volumes or bind mounts, especially for database state.
8. Production-style orchestration appears in the Compose-based episodes. docker-compose.yml is used to define service boundaries, startup relationships, environment variables, volumes, and health-related behavior across multiple containers. This is the clearest “system-level” architecture in the repo.
9. EP10-Real-world represents the most complete deployment topology. It combines a Flask app, Postgres, Nginx, and cAdvisor into a production-like stack, with .env-driven configuration and a dedicated Nginx configuration file. This episode is the best reference for an architecture diagram of the end state.
10. Security and operational concerns are separate learning subsystems, not just app code. EP8-Security focuses on container hardening, while EP5-Crashloop addresses startup failures, configuration, restart policies, and healthchecks. These episodes show how runtime reliability and privilege boundaries are managed inside containers.
11. Image build quality is another explicit architectural boundary. EP7-Image-optimization contrasts bloated versus optimized Dockerfiles, highlighting build-stage structure, dependency handling, and context minimization via .dockerignore. This episode is about build-time efficiency rather than runtime behavior.
12. CI/CD is represented as an automation subsystem in EP9-CICD. The GitHub Actions workflow builds and pushes a Docker image to Docker Hub on main, with secrets used for registry authentication. This introduces the repo’s external delivery boundary: source code in GitHub, images in a registry.
13. Overall, the repo has a consistent “teaching system” architecture: each episode contains the same documentation scaffolding, while the runnable assets demonstrate a specific Docker pattern in isolation. For an architecture diagram, the most accurate top-level view is a course platform containing multiple independent Docker example stacks, each centered on a Flask-based service and progressively adding infra concerns around it.
Main entry points: docker-compose.yml Prod stack · EP2-docker-flask/README.md Episode 2 · EP3-docker-networking/README.md Episode 3 · EP6-Docker-compose/README.md Episode 6
Components 22
Curriculum
Repository overview and episode documentation
- Course hub · Top-level course entry and series framing
README.md - Episode 1 · Docker setup and core container basics
EP1-docker-setup/README.md - Episode 2 · Docker images, layers, and a first Flask container
EP2-docker-flask/README.md - Episode 3 · Dockerfiles and container networking basics
EP3-docker-networking/README.md - Episode 4 · Persistent volumes and durable storage labs
EP4-Persistent-Volumes/README.md - Episode 5 · Crash loops, startup failures, and recovery behavior
EP5-Crashloop/README.md - Episode 6 · Multi-container orchestration with Docker Compose
EP6-Docker-compose/README.md
Runtime demos
Runnable Docker examples and service stacks
- Episode 10 · Production-like stack with proxy, app, and database
EP10-Real-world/README.md - Flask app · Single-service app used to demonstrate container images
EP2-docker-flask/app.py - Net app · App container used to explore inter-container communication
EP3-docker-networking/app.py - Compose stack · App and reverse proxy coordinated by Compose
EP6-Docker-compose/docker-compose.yml - Prod stack · Full production-style deployment topology
EP10-Real-world/docker-compose.yml - Web app · Flask service container in the production stack
EP10-Real-world/flask-app/app.py - Reverse proxy · Nginx front door for the production stack
EP10-Real-world/nginx.conf - Postgres · Database service and persistent application state
EP10-Real-world/docker-compose.yml - cAdvisor · Container observability in the production stack
EP10-Real-world/docker-compose.yml
Delivery ops
Build, security, and CI/CD concerns
- Episode 7 · Image optimization and build-time efficiency
EP7-Image-optimization/README.md - Episode 8 · Container hardening and runtime security
EP8-Security/README.md - Episode 9 · GitHub Actions build and publish workflow
EP9-CICD/README.md - Build variants · Bloated versus optimized Dockerfile comparison
EP7-Image-optimization/Dockerfileoptimized - Hardening builds · Security-oriented Dockerfile revisions
EP8-Security/Dockerfilev3 - Publish workflow · GitHub Actions pipeline that builds and pushes images
EP9-CICD/.github/workflows/docker.yml
Connections 26
- Course hub → Episode 1: series starts · Course introduction leads into episode 1
- Course hub → Episode 10: series ends · Course culminates in the production-style stack
- Episode 1 → Episode 2: progresses to · Fundamentals move into image building
- Episode 2 → Episode 3: adds networking · The same app is extended for container communication
- Episode 3 → Episode 4: adds storage · Networking lessons expand into persistence
- Episode 4 → Episode 5: addresses failures · Persistence concepts lead into crash-loop behavior
- Episode 5 → Episode 6: orchestrates · Single-container examples evolve into Compose stacks
- Episode 6 → Episode 7: optimizes builds · Orchestration is followed by image efficiency work
- Episode 7 → Episode 8: hardens runtime · Build quality leads into security hardening
- Episode 8 → Episode 9: automates delivery · Security and packaging culminate in CI/CD
- Episode 9 → Episode 10: deploys to stack · Automation feeds the final production-like architecture
- Episode 2 → Flask app: contains · Episode 2 centers on a Flask demo app
- Episode 3 → Net app: contains · Episode 3 reuses a Flask app for networking examples
- Episode 6 → Compose stack: defines · Compose file defines the multi-container demo
- Episode 10 → Prod stack: defines · Compose file defines the end-state topology
- Prod stack → Web app: runs · The stack includes the Flask application service
- Prod stack → Reverse proxy: fronts with · Nginx serves as reverse proxy
- Prod stack → Postgres: persists in · Database service holds durable state
- Prod stack → cAdvisor: observes · cAdvisor provides container metrics
- Compose stack → Prod stack: evolves into · Compose-based learning expands into the full production stack
- Episode 7 → Build variants: contrasts · Episode 7 compares bloated and optimized builds
- Episode 8 → Hardening builds: refines · Episode 8 iterates through hardened Dockerfiles
- Episode 9 → Publish workflow: implements · Episode 9 uses a GitHub Actions workflow
- Flask app → Net app: same pattern · The Flask service pattern is reused across episodes
- Web app → Reverse proxy: served through · Application traffic is routed via Nginx
- Web app → Postgres: reads writes · App depends on database-backed state