Docker Architecture
Docker consists of multiple components working together.
Main components:
- Docker Engine
- Docker CLI
- Docker Images
- Docker Containers
- Docker Registry
High-Level Architecture
+-----------------------------------+
| Docker CLI |
| docker run / docker ps / etc. |
+-----------------------------------+
↓
+-----------------------------------+
| Docker Engine (dockerd) |
+-----------------------------------+
↓
+-----------------------------------+
| Containers / Images / Networks |
+-----------------------------------+
Docker Engine
Docker Engine is the backend service responsible for:
- creating containers
- managing images
- networking
- storage
- container lifecycle
Main service:
dockerd
Docker CLI
The Docker CLI is the command-line interface.
Examples:
docker ps
docker images
docker run nginx
The CLI communicates with Docker Engine.
Docker Registry
Docker images are usually downloaded from registries.
Most common registry:
Docker Hub
Example:
docker pull nginx
Docker downloads the image automatically.
Docker Workflow
Simplified workflow:
Dockerfile
↓
Docker Image
↓
Docker Container