Docker Documentation
A comprehensive guide to building, shipping, and running applications with Docker. From first-time installation to production-grade orchestration with Compose.
Learning Path
1. Introduction
Start here to understand the container revolution and core architecture.
- Introduction and Core Concepts — Architecture, History, and Licensing
- Installation and Engine Setup — Secure host setup
2. Core Workflows
Master the three phases of the Docker lifecycle: Build, Ship, and Run.
| Phase | Module | Focus |
|---|---|---|
| Build | Images and Build Workflows | Dockerfiles, Multistage Builds, and Image Optimization |
| Run | Containers and Runtime | Lifecycle, Healthchecks, and Resource Limits |
| Connect | Networking | Bridge, Host, Overlay, and DNS Service Discovery |
| Persist | Volumes and Data | Stateful data, backups, and bind mounts |
3. Orchestration & Operations
Move from single containers to multi-service stacks and production maintenance.
- Docker Compose in Depth — Multi-container applications
- Operations and Observability — Logging, Monitoring, and Maintenance
- Security Hardening — Rootless mode, secrets, and scanning
4. Advanced & Reference
Expert-level tuning, troubleshooting, and strategy.
- Optimization — Image size and build speed
- Strategy — Automation and long-term management
- Troubleshooting — Incident runbooks
- Cheatsheet — Quick command reference
Common Architectures
1) The standard "Build -> Ship -> Run" Pipeline
flowchart LR
DEV[Developer] -->|git push| REPO[Source Code]
REPO -->|CI Build| BUILDER[Docker Build]
BUILDER -->|docker push| REGISTRY[(Container Registry)]
REGISTRY -->|docker pull| PROD[Production Server]
PROD -->|docker run| APP[Running App]
2) Local Development with Compose
flowchart TD
subgraph Host["Developer Machine"]
COMPOSE[docker-compose.yml] --> APP[App Container]
COMPOSE --> DB[Database Container]
APP -->|Network| DB
APP -->|Bind Mount| CODE[Source Code]
end
Tooling Matrix
| Tool | Role | Best For |
|---|---|---|
| Docker Engine | Runtime & Build | Single-node servers, local development |
| Docker Compose | Orchestration | Multi-container apps on a single host |
| Podman | Runtime (Alternative) | Rootless by design, daemonless (RedHat ecosystem) |
| Kubernetes | Orchestration | Multi-node clusters, high availability, auto-scaling |
Quick Start
first-run.sh
# 1) Run your first container (Nginx web server)
docker run -d -p 8080:80 --name my-web-server nginx:alpine
# 2) Verify it's running
docker ps
# 3) Check the logs
docker logs my-web-server
# 4) Stop and remove it
docker stop my-web-server
docker rm my-web-server
Prerequisites
- Familiarity with Linux command line
- Basic understanding of networking (IPs, Ports)
Success Criteria
By the end of this documentation, you will be able to:
- Write optimized Multi-Stage Dockerfiles.
- Debug networking issues between containers.
- Manage persistent state safely.
- Orchestrate full stacks with Docker Compose.