Docker Zero to Hero - From Beginner to Professional

Mục Tiêu Series

Tìm hiểu Docker từ cơ bản đến nâng cao, từ việc chạy container đơn giản đến xây dựng và triển khai hệ thống microservices phức tạp trên production.

Danh Sách Bài Học

Part 1: Docker Fundamentals (Zero to Beginner)

1. Introduction to Docker & Containerization

  • Containerization là gì?
  • Docker vs Virtual Machines
  • Benefits của Docker
  • Docker use cases
  • Docker architecture overview
  • Docker Desktop vs Docker Engine
  • When to use Docker

2. Installing Docker

  • Docker Desktop installation (Windows, macOS, Linux)
  • Docker Engine installation (Linux servers)
  • Docker account setup
  • Verify installation
  • Docker CLI basics
  • Docker Desktop UI overview
  • System requirements

3. Docker Images Fundamentals

  • Images vs Containers
  • Docker Hub introduction
  • Pulling images (docker pull)
  • Listing images (docker images)
  • Image tags và versions
  • Official vs community images
  • Image naming conventions
  • Removing images (docker rmi)

4. Running Your First Containers

  • docker run command
  • Container lifecycle
  • Running interactive containers (-it flag)
  • Detached mode (-d flag)
  • Naming containers (--name)
  • Port mapping (-p flag)
  • Listing containers (docker ps)
  • Stopping containers (docker stop)
  • Removing containers (docker rm)

5. Working with Containers

  • Container logs (docker logs)
  • Following logs (-f flag)
  • Executing commands in containers (docker exec)
  • Interactive shell access
  • Copying files (docker cp)
  • Container inspection (docker inspect)
  • Container stats (docker stats)
  • Restarting containers

6. Container Networking Basics

  • Default bridge network
  • Port publishing (-p vs -P)
  • Container-to-container communication
  • Network inspection
  • DNS resolution
  • Host networking
  • None network

7. Data Persistence with Volumes

  • Container filesystem
  • Volume concepts
  • Creating volumes (docker volume create)
  • Named volumes vs anonymous volumes
  • Bind mounts
  • Volume mounting (-v vs --mount)
  • Volume inspection
  • Volume cleanup

Part 2: Building Custom Images (Beginner to Intermediate)

8. Dockerfile Basics

  • Dockerfile syntax
  • FROM instruction
  • RUN instruction
  • COPY vs ADD
  • WORKDIR instruction
  • CMD instruction
  • Building images (docker build)
  • Image tagging
  • .dockerignore file

9. Dockerfile Best Practices

  • Layer caching
  • Multi-line RUN commands
  • Combining RUN instructions
  • Order of instructions
  • Minimizing layers
  • Using specific base images
  • Cleaning up in same layer
  • Security considerations

10. Advanced Dockerfile Instructions

  • ENV variables
  • ARG vs ENV
  • EXPOSE instruction
  • VOLUME instruction
  • USER instruction
  • LABEL metadata
  • HEALTHCHECK instruction
  • ONBUILD instruction
  • SHELL instruction

11. Multi-Stage Builds

  • Multi-stage build concepts
  • Build stage naming
  • Copying artifacts between stages
  • Reducing image size
  • Separating build và runtime dependencies
  • Real-world examples (Node.js, Go, Java)
  • Build targets
  • Advanced patterns

12. Image Optimization

  • Base image selection
  • Alpine Linux images
  • Distroless images
  • Image size reduction techniques
  • Layer optimization
  • Build cache optimization
  • Security scanning
  • Image best practices

Part 3: Docker Compose (Intermediate)

13. Docker Compose Introduction

  • Docker Compose overview
  • Install Docker Compose
  • docker-compose.yml structure
  • YAML syntax basics
  • Version differences
  • Compose vs docker run
  • Use cases

14. Compose File Fundamentals

  • Services definition
  • Image vs build
  • Container naming
  • Port mapping
  • Environment variables
  • Volume mounting
  • Networks
  • Dependencies (depends_on)

15. Multi-Container Applications

  • Web + Database setup
  • Service communication
  • Environment configuration
  • Shared volumes
  • Network isolation
  • Health checks
  • Startup order
  • Real examples (WordPress, MEAN stack)

16. Docker Compose Commands

  • docker-compose up/down
  • Starting/stopping services
  • Building services
  • Viewing logs
  • Executing commands
  • Scaling services
  • Service management
  • Compose profiles

17. Advanced Compose Features

  • Extension fields
  • Multiple compose files
  • Override files
  • Variable substitution
  • .env files
  • Secrets management
  • Configs
  • Deploy configuration
  • Resource limits

Part 4: Docker Networking (Intermediate to Advanced)

18. Docker Networks Deep Dive

  • Network drivers overview
  • Bridge networks
  • Host networks
  • Overlay networks
  • Macvlan networks
  • Custom networks
  • Network scopes

19. Creating Custom Networks

  • Creating bridge networks
  • Network configuration
  • Subnet và IP range
  • Gateway configuration
  • DNS configuration
  • Connecting containers
  • Network aliases
  • Multi-network containers

20. Service Discovery

  • DNS-based discovery
  • Container linking (legacy)
  • Docker DNS server
  • Network aliases
  • Service mesh introduction
  • Load balancing basics
  • Health-based routing

21. Network Security

  • Network isolation
  • Internal networks
  • Firewall rules
  • Network policies
  • Encrypted networks
  • Security best practices
  • Network troubleshooting

Part 5: Data Management (Intermediate to Advanced)

22. Volume Drivers

  • Local volume driver
  • NFS volumes
  • Cloud volume drivers
  • Third-party drivers
  • Volume plugins
  • Distributed storage
  • Backup strategies

23. Backup & Restore

  • Volume backup strategies
  • Container data export
  • Database backups in containers
  • Automated backup solutions
  • Disaster recovery
  • Migration strategies
  • Testing backups

24. StatefulSets & Persistent Data

  • Stateless vs stateful applications
  • Database containers
  • Data initialization
  • Volume permissions
  • Data replication
  • Backup automation
  • Production considerations

Part 6: Docker Security (Advanced)

25. Container Security Fundamentals

  • Security threats
  • Container isolation
  • Linux capabilities
  • Seccomp profiles
  • AppArmor/SELinux
  • Read-only filesystems
  • Drop privileges

26. Image Security

  • Vulnerability scanning
  • Docker Security Scanning
  • Trivy, Clair, Anchore
  • Base image selection
  • Minimal images
  • Signing images
  • Private registries
  • Content trust

27. Runtime Security

  • Resource limits
  • User namespaces
  • Rootless Docker
  • Security contexts
  • Secrets management
  • Environment variables security
  • Audit logging
  • Security monitoring

28. Docker Bench Security

  • Docker Bench for Security
  • CIS benchmarks
  • Security hardening
  • Compliance checking
  • Automated auditing
  • Remediation strategies

Part 7: Docker in Production (Advanced)

29. Production Best Practices

  • 12-factor app principles
  • Image tagging strategies
  • Rolling updates
  • Zero-downtime deployment
  • Health checks
  • Logging strategies
  • Monitoring setup
  • Alerting

30. Docker Swarm Basics

  • Swarm mode overview
  • Initializing swarm
  • Manager vs worker nodes
  • Services vs containers
  • Replicas và scaling
  • Load balancing
  • Service discovery
  • Rolling updates

31. Docker Swarm Advanced

  • Stack deployment
  • Secrets management
  • Configs management
  • Placement constraints
  • Update strategies
  • Network encryption
  • High availability
  • Production deployment

32. Container Orchestration Introduction

  • Orchestration overview
  • Docker Swarm vs Kubernetes
  • When to use orchestration
  • Migration strategies
  • Kubernetes basics
  • ECS, ACS overview
  • Choosing orchestrator

Part 8: CI/CD with Docker (Advanced)

33. Docker in CI/CD Pipelines

  • CI/CD concepts
  • Docker in build process
  • Testing in containers
  • Docker as build environment
  • Multi-stage builds for CI
  • Artifact management
  • Build optimization

34. GitLab CI with Docker

  • GitLab Runner setup
  • .gitlab-ci.yml configuration
  • Docker executor
  • Building images in CI
  • Running tests
  • Pushing to registry
  • Deployment automation

35. GitHub Actions with Docker

  • GitHub Actions basics
  • Docker actions
  • Building và pushing images
  • Multi-platform builds
  • Cache optimization
  • Security scanning
  • Deployment workflows

36. Jenkins & Docker

  • Jenkins installation
  • Docker plugin
  • Pipeline as code
  • Building images
  • Running tests
  • Docker agents
  • Deployment pipelines

Part 9: Docker Registry & Distribution (Advanced)

37. Docker Hub

  • Docker Hub features
  • Public vs private repos
  • Automated builds
  • Webhooks
  • Organizations
  • Team management
  • Rate limiting

38. Private Docker Registry

  • Registry deployment
  • Authentication setup
  • TLS configuration
  • Storage drivers
  • Garbage collection
  • High availability
  • Security hardening

39. Harbor Registry

  • Harbor introduction
  • Installation
  • Image replication
  • Vulnerability scanning
  • RBAC
  • Helm charts
  • Integration with CI/CD

40. Distribution Strategies

  • Multi-registry setup
  • Image promotion
  • Geo-distributed registries
  • Caching strategies
  • CDN integration
  • Bandwidth optimization

Part 10: Advanced Topics (Hero Level)

41. Docker BuildKit

  • BuildKit introduction
  • Enabling BuildKit
  • Build secrets
  • SSH forwarding
  • Cache mounts
  • Build output
  • Custom builders
  • Performance optimization

42. Docker Buildx

  • Buildx plugin
  • Multi-platform builds
  • Cross-compilation
  • Builder instances
  • Remote builders
  • Build attestation
  • SBOM generation

43. Container Resource Management

  • CPU limits và reservation
  • Memory limits
  • Disk I/O limits
  • Network bandwidth
  • PID limits
  • OOM killer
  • cgroups
  • Resource monitoring

44. Docker Plugins

  • Plugin architecture
  • Volume plugins
  • Network plugins
  • Authorization plugins
  • Logging plugins
  • Installing plugins
  • Creating custom plugins

45. Docker API

  • Docker API overview
  • REST API basics
  • SDK usage (Python, Go)
  • Remote API access
  • TLS configuration
  • API versioning
  • Automation scripts

46. Docker Internals

  • Container technology
  • Namespaces
  • Cgroups
  • Union filesystems
  • Overlay2
  • Container runtime (containerd, runc)
  • OCI standards
  • Image layers

47. Troubleshooting Docker

  • Common issues
  • Debugging techniques
  • Log analysis
  • Network troubleshooting
  • Performance issues
  • Disk space problems
  • Build failures
  • Container crashes

48. Docker Performance Optimization

  • Image optimization
  • Build performance
  • Runtime performance
  • Network optimization
  • Storage performance
  • Monitoring tools
  • Profiling
  • Benchmarking

Part 11: Real-World Projects (Hero Level)

49. Project 1: Microservices Application

Full-Stack Application with Docker

  • Frontend (React)
  • Backend API (Node.js/Python/Go)
  • Database (PostgreSQL)
  • Cache (Redis)
  • Message Queue (RabbitMQ)
  • Reverse Proxy (Nginx)
  • docker-compose setup
  • Production deployment

50. Project 2: CI/CD Pipeline

Complete DevOps Pipeline

  • Git repository
  • Automated testing
  • Docker image building
  • Security scanning
  • Multi-stage deployment
  • Monitoring setup
  • Rollback strategies

51. Project 3: Multi-Environment Setup

Dev, Staging, Production

  • Environment-specific configs
  • Secret management
  • Database migrations
  • Blue-green deployment
  • Monitoring và logging
  • Backup automation

52. Project 4: Docker Swarm Cluster

Production Cluster Setup

  • Multi-node cluster
  • Load balancing
  • Service discovery
  • Rolling updates
  • Health monitoring
  • Disaster recovery

Prerequisites

  • ✅ Basic Linux command line knowledge
  • ✅ Understanding of web applications
  • ✅ Programming experience (any language)
  • 📝 Git basics (helpful but not required)
  • 📝 Networking basics (helpful)

Thời Gian Học

  • Ước tính: 8-10 tuần
  • Part 1-2 (Fundamentals): 2 tuần
  • Part 3-5 (Intermediate): 2-3 tuần
  • Part 6-8 (Advanced): 2-3 tuần
  • Part 9-11 (Hero Level): 2 tuần
  • Thực hành: 3-4 giờ/ngày
  • Total lessons: 52 bài học

Learning Path

ZERO (Week 1-2)  Docker Basics  Images & ContainersBEGINNER (Week 3-4)  Dockerfile  Multi-Stage Builds  Docker ComposeINTERMEDIATE (Week 5-6)  Networking  Volumes  Security BasicsADVANCED (Week 7-8)  Production Setup  Docker Swarm  CI/CD IntegrationHERO (Week 9-10)  Orchestration  Performance Tuning  Real ProjectsDOCKER EXPERT 🚀

Tools & Technologies

Required:

  • Docker Desktop / Docker Engine
  • Text editor (VS Code recommended)
  • Terminal/Command line
  • Git

Will Learn:

  • Docker CLI
  • Docker Compose
  • Docker Swarm
  • GitLab CI / GitHub Actions
  • Harbor Registry
  • Various databases (PostgreSQL, MySQL, MongoDB, Redis)
  • Web servers (Nginx, Apache)
  • Programming frameworks (Node.js, Python, Go)

Certification Path

After completing this course, you'll be prepared for:

  • Docker Certified Associate (DCA)
  • Certified Kubernetes Administrator (CKA) - foundation
  • AWS Certified DevOps Engineer

Projects Overview

11 Hands-on Projects:

  1. Simple Web App (Nginx + HTML)
  2. LAMP Stack (Linux, Apache, MySQL, PHP)
  3. MEAN Stack (MongoDB, Express, Angular, Node)
  4. WordPress Blog (WordPress + MySQL)
  5. Python Web App (Django/Flask + PostgreSQL)
  6. Node.js API (Express + MongoDB)
  7. Go Microservice (Go + Redis)
  8. Full Microservices (Multi-service architecture)
  9. CI/CD Pipeline (Automated deployment)
  10. Multi-Environment Setup (Dev/Staging/Prod)
  11. Docker Swarm Cluster (Production cluster)

Tài Nguyên Tham Khảo

Official Documentation:

Books:

  • Docker Deep Dive by Nigel Poulton
  • Docker in Action by Jeff Nickoloff
  • The Docker Book by James Turnbull

Online Resources:

Video Courses:

  • Docker Mastery on Udemy
  • Docker for Developers (Pluralsight)
  • Docker Deep Dive (A Cloud Guru)

Bài Tập

Mỗi bài học bao gồm:

  • 📖 Theory: Concepts và best practices
  • 💻 Lab Exercises: 3-5 hands-on labs
  • 🔨 Mini Projects: Build real applications
  • 📝 Quiz: 10-15 questions
  • 🎯 Challenge: Advanced exercises
  • 🐛 Troubleshooting: Debug exercises

Kết Quả Sau Khóa Học

✅ Kiến Thức:

Level 1 - Fundamentals:

  • ✅ Hiểu containerization concepts
  • ✅ Run và manage containers
  • ✅ Work with Docker images
  • ✅ Basic networking và volumes

Level 2 - Intermediate:

  • ✅ Write Dockerfile efficiently
  • ✅ Multi-stage builds
  • ✅ Docker Compose mastery
  • ✅ Custom networks
  • ✅ Data persistence strategies

Level 3 - Advanced:

  • ✅ Container security
  • ✅ Production deployment
  • ✅ Docker Swarm orchestration
  • ✅ CI/CD integration
  • ✅ Private registry setup

Level 4 - Hero:

  • ✅ Performance optimization
  • ✅ Microservices architecture
  • ✅ Advanced troubleshooting
  • ✅ Custom plugins
  • ✅ Docker API automation

🚀 Kỹ Năng:

  1. Development:

    • Containerize any application
    • Multi-container architecture
    • Development environments
    • Local testing setup
  2. DevOps:

    • CI/CD pipeline setup
    • Automated deployments
    • Infrastructure as Code
    • GitOps workflows
  3. Production:

    • Production deployment
    • High availability setup
    • Monitoring và logging
    • Security hardening
    • Disaster recovery
  4. Architecture:

    • Microservices design
    • Service mesh basics
    • Container orchestration
    • Cloud-native applications

💼 Career Opportunities:

Sau khóa học, bạn có thể làm:

  • Docker Engineer
  • DevOps Engineer
  • Cloud Engineer
  • Site Reliability Engineer (SRE)
  • Platform Engineer
  • Container Specialist
  • Kubernetes Engineer (với thêm K8s knowledge)

📊 Salary Range (Vietnam):

  • Junior Docker Engineer: 15-25M VND/month
  • Mid-level DevOps (Docker): 25-40M VND/month
  • Senior DevOps/SRE: 40-80M VND/month
  • Lead Platform Engineer: 80M+ VND/month

Module Tiếp Theo

Option 1: Kubernetes Zero to Hero

  • Container orchestration at scale
  • K8s architecture
  • Deployments, Services, Ingress
  • Helm charts
  • Production K8s

Option 2: CI/CD Mastery

  • Jenkins advanced
  • GitLab CI/CD
  • GitHub Actions
  • ArgoCD
  • Tekton

Option 3: Cloud Platforms with Docker

  • AWS ECS, EKS
  • Google Cloud Run, GKE
  • Azure Container Instances, AKS
  • Multi-cloud strategies

Option 4: Microservices Architecture

  • Service design patterns
  • API Gateway
  • Service mesh (Istio, Linkerd)
  • Distributed tracing
  • Observability

Tips Để Thành Công

  1. Practice Daily - Chạy containers mỗi ngày
  2. Build Projects - Containerize your own apps
  3. Read Docs - Docker docs are excellent
  4. Join Community - Docker forums, Slack channels
  5. Experiment - Break things and learn
  6. Optimize - Always improve your Dockerfiles
  7. Security First - Never compromise on security
  8. Stay Updated - Docker evolves quickly
  9. Teach Others - Best way to solidify knowledge
  10. Certify - Get Docker Certified Associate

Course Structure

Theory vs Practice Ratio:

  • 📚 Theory: 30%
  • 💻 Hands-on Labs: 50%
  • 🎯 Projects: 20%

Assessment Methods:

  • ✅ Quizzes after each section
  • ✅ Hands-on lab completion
  • ✅ Mini project submissions
  • ✅ Final capstone project
  • ✅ Mock DCA exam

Support:

  • 💬 Discussion forum
  • 📧 Email support
  • 🎥 Video demonstrations
  • 📝 Detailed documentation
  • 👥 Study groups

Ready to become a Docker Hero? Let's containerize everything! 🐳🚀

"Build, Ship, and Run Any App, Anywhere" - Docker Motto