Chuyển đến nội dung chính
Cơ bản

Docker từ Cơ bản đến Nâng cao

Khóa học Docker toàn diện từ cơ bản đến nâng cao, giúp bạn làm chủ container technology từ những khái niệm đầu tiên đến triển khai production thực tế. Bao gồm Dockerfile, Docker Compose, Networking, Storage, Security, CI/CD, Docker Swarm, Microservices và các best practices cho môi trường enterprise. Cập nhật theo Docker Engine 27+ và các công nghệ container hiện đại nhất 2026.

DUY TRANDuy Tran
20 bài học
60 giờ
Docker từ Cơ bản đến Nâng cao

Nội dung series

5 phần · 20 bài học

Phần 1: Nền tảng Docker

Bài 1: Giới thiệu Docker - Container và Virtualization

  • Docker là gì? Lịch sử phát triển container technology

  • Container vs Virtual Machine - So sánh chi tiết

  • Kiến trúc Docker Engine: Docker Daemon, Docker CLI, containerd, runc

  • OCI (Open Container Initiative) standards

  • Docker Desktop vs Docker Engine

  • Use cases thực tế của Docker trong doanh nghiệp

Bài 2: Cài đặt Docker và Các lệnh Cơ bản

  • Cài đặt Docker Engine trên Ubuntu/CentOS/macOS/Windows

  • Cấu hình Docker daemon (daemon.json)

  • Docker CLI cơ bản: run, ps, stop, start, rm, exec, logs

  • Interactive mode vs Detached mode

  • Port mapping và environment variables cơ bản

  • Docker system commands: info, version, df, prune

Bài 3: Docker Images - Build, Pull và Quản lý

  • Docker image là gì? Layer architecture

  • Docker Hub và Official Images

  • Các lệnh: pull, push, images, tag, rmi, history, inspect

  • Image naming convention và tagging strategies

  • Chọn base image phù hợp (Alpine, Slim, Distroless)

  • Docker image prune và cleanup

Bài 4: Docker Containers - Vòng đời và Quản lý

  • Vòng đời container: created → running → paused → stopped → deleted

  • Resource limits: CPU, memory, I/O

  • Restart policies: no, always, unless-stopped, on-failure

  • Docker inspect và docker stats

  • Container debugging: exec, attach, cp, diff, export

  • Container naming conventions và labels

Phần 2: Dockerfile và Image Optimization

Bài 5: Dockerfile từ A đến Z

  • Tất cả Dockerfile instructions: FROM, RUN, COPY, ADD, CMD, ENTRYPOINT

  • ENV, ARG, WORKDIR, EXPOSE, VOLUME, USER

  • HEALTHCHECK, LABEL, SHELL, STOPSIGNAL

  • CMD vs ENTRYPOINT - Khi nào dùng gì?

  • COPY vs ADD - Best practices

  • Build context và .dockerignore

Bài 6: Multi-stage Builds và Tối ưu Docker Image

  • Multi-stage builds để giảm kích thước image

  • Layer caching optimization

  • Alpine vs Distroless vs Scratch base images

  • Security scanning với Trivy và Snyk

  • Docker Scout và image analysis

  • Chiến lược tối ưu image cho từng ngôn ngữ (Node.js, Java, Go, Python)

Bài 7: Docker Registry - Docker Hub và Private Registry

  • Docker Hub: repositories, automated builds, webhooks

  • Triển khai Private Registry với Docker Registry

  • Harbor - Enterprise Container Registry

  • Image tagging strategies và versioning

  • Registry authentication và authorization

  • Vulnerability scanning và security policies

Bài 8: Docker Compose Cơ bản

  • Docker Compose là gì? Tại sao cần Compose?

  • Cú pháp docker-compose.yml

  • Services, networks, volumes

  • depends_on và healthcheck

  • Lab: Deploy Nginx + Node.js + PostgreSQL + Redis

  • Docker Compose CLI: up, down, ps, logs, exec, build

Phần 3: Networking, Storage và Compose Nâng cao

Bài 9: Docker Networking Deep Dive

  • Network drivers: bridge, host, overlay, macvlan, none

  • Docker DNS resolution và service discovery

  • Container-to-container communication

  • Port mapping chi tiết

  • Custom bridge networks vs default bridge

  • Multi-host networking với overlay

  • Network troubleshooting tools

Bài 10: Docker Volumes và Persistent Storage

  • Volumes vs Bind mounts vs tmpfs mounts

  • Named volumes và anonymous volumes

  • Volume drivers và plugins (NFS, AWS EBS, GlusterFS)

  • Backup và restore data từ volumes

  • Storage best practices cho databases

  • Read-only volumes và volume permissions

Bài 11: Docker Compose Nâng cao

  • Compose profiles cho multiple environments

  • Extends và override files

  • Variable substitution và .env files

  • Deploy configuration và resource limits

  • Scaling services với Compose

  • Compose Watch cho hot-reload development

  • Production-ready Compose configurations

Bài 12: Environment Variables, Secrets và Configuration

  • Environment variables trong Docker

  • .env files và variable precedence

  • Docker configs và Docker secrets

  • HashiCorp Vault integration

  • 12-Factor App methodology

  • Configuration management patterns

Phần 4: Security, Monitoring và CI/CD

Bài 13: Docker Security Best Practices

  • Docker daemon security

  • Rootless containers và non-root users

  • User namespaces và Linux capabilities

  • Seccomp profiles và AppArmor/SELinux

  • Read-only filesystems và capability dropping

  • Docker Content Trust (image signing)

  • CIS Docker Benchmark

Bài 14: Docker Logging và Monitoring

  • Docker logging drivers: json-file, syslog, fluentd, gelf

  • Centralized logging với ELK/EFK Stack

  • Container metrics với cAdvisor

  • Prometheus + Grafana dashboards cho Docker

  • Docker events và health monitoring

  • Alerting strategies

Bài 15: Docker trong CI/CD Pipeline

  • Docker trong Jenkins Pipeline

  • GitLab CI với Docker

  • GitHub Actions với Docker

  • Docker-in-Docker (DinD) vs Docker Socket mounting

  • Automated testing với Docker containers

  • Blue-green và canary deployments

Bài 16: Docker Performance Tuning

  • Tối ưu Docker build speed với BuildKit

  • Layer caching strategies nâng cao

  • Container runtime performance

  • Resource management với cgroups v2

  • Storage driver optimization (overlay2)

  • Network performance tuning

  • Benchmarking tools và profiling

Phần 5: Production và Advanced Topics

Bài 17: Docker Swarm - Container Orchestration

  • Docker Swarm mode: init, join, leave

  • Services, tasks và replicas

  • Rolling updates và rollback

  • Overlay networking và ingress

  • Placement constraints và preferences

  • Secrets và configs trong Swarm

  • Docker Swarm vs Kubernetes comparison

Bài 18: Docker cho Microservices Architecture

  • Thiết kế microservices với Docker containers

  • Service discovery patterns

  • API Gateway với Docker (Traefik, Kong)

  • Inter-service communication (REST, gRPC, messaging)

  • Event-driven architecture với Docker

  • Distributed tracing với Jaeger

  • Circuit breaker patterns

Bài 19: Docker với Kubernetes - Migration Path

  • Từ Docker Compose đến Kubernetes manifests

  • Kompose - chuyển đổi Compose sang K8s

  • Container Runtime Interface (CRI)

  • Helm charts cho Docker applications

  • Từ Docker Swarm sang Kubernetes

  • Hybrid deployment strategies

Bài 20: Production Deployment và Troubleshooting

  • Production readiness checklist

  • Zero-downtime deployment strategies

  • Disaster recovery và backup plans

  • Common Docker issues và solutions

  • Docker debugging techniques nâng cao

  • Disk management và cleanup strategies

  • Enterprise Docker deployment patterns

DUY TRAN
Tác giả

DUY TRAN

Pursuing an AI-first mindset and intelligent system architecture. I build solutions by combining technology, creativity, and the ability to see structure in chaos — the foundation for becoming a Solution Architect.

Bình luận