Part 11 · Docker · 11.1 Lý thuyết

Kiến trúc Docker và container lifecycle

Container là isolated process dùng host kernel và layered filesystem; không phải một VM nhỏ.

Cách học: đi từ Engine/OCI/runtime và lifecycle trước, sau đó tới build, isolation, storage, networking, Compose, security, process/signals và vận hành. Cuối phần có một deep dive nối Docker với Kubernetes và đường dẫn tới runtime failure labs.

Nội dung lý thuyết

01

Engine, OCI & Runtime

CLI, daemon, API, containerd, shim, runc và OCI.

02

Image & Container Lifecycle

Manifests, layers, writable layer, create/start/stop/remove.

03

BuildKit & Dockerfile

Build graph, cache, multi-stage, secrets và reproducibility.

04

Isolation & Resources

Namespaces, cgroups, capabilities, seccomp và limits.

05

Storage & Filesystems

Overlay, volumes, bind mounts, ownership và backup.

06

Container Networking

Network namespaces, bridge, veth, DNS, NAT và ports.

07

Docker Compose

Service graph, health, dependency, profiles và local stack.

08

Security & Supply Chain

Non-root, read-only, SBOM, signing, scanning và secrets.

09

Process, PID 1 & Signals

Exec form, zombie reaping, graceful shutdown và OOM.

10

Nginx & Operations

Static serving, reverse proxy, buffering, logs và debugging.

11 · Deep dive

Docker → Kubernetes

OCI/CRI runtime path, Compose mapping, resources, network, storage, security và failure layers.

11.3A · Execution

Docker execution labs

4 lab failure-first với evidence cho build, signals, resources, filesystem và networking.

Labs

Runtime failure labs

Image-to-Pod compatibility, graceful rollout, Ingress và NetworkPolicy.