Docker Architecture
Understanding Docker architecture helps you know how Docker works under the hood. Docker uses a client-server architecture made up of several core components.
Core Components of Docker Architecture
| Component | Role |
|---|---|
| Docker Client | The CLI tool you use to run Docker commands |
| Docker Daemon (dockerd) | Runs in background, manages containers and images |
| Docker Images | Read-only templates used to create containers |
| Docker Containers | Running instances of Docker images |
| Docker Registry | Stores Docker images (Docker Hub is the public registry) |
How Docker Client and Daemon Communicate
When you type a Docker command like docker run nginx, here is what happens:
- The Docker Client sends the command to the Docker Daemon via REST API.
- The Docker Daemon checks if the image exists locally.
- If not found, it pulls the image from Docker Hub (Registry).
- The Daemon creates and starts a Container from the image.
- Output is returned back to the Docker Client.
# Docker Client sends this command
docker run nginx
# Docker Daemon pulls image if not available
# Unable to find image locally
# Pulling from library/nginx
Docker Objects
Images
An image is a read-only template that contains the OS, app code, runtime, libraries, and environment variables.
# List all local images
docker images
# Pull an image from Docker Hub
docker pull ubuntu
Containers
A container is a running instance of an image. It has its own filesystem, network, and process space.
# Run a container
docker run -it ubuntu bash
# List running containers
docker ps
# List all containers (including stopped)
docker ps -a
Docker Registry
Docker Hub is the default public registry. You can also set up a private registry.
# Push image to Docker Hub
docker push yourusername/myapp
# Pull image from Docker Hub
docker pull yourusername/myapp
Docker Namespaces & Control Groups
Docker uses Linux features under the hood:
- Namespaces — Isolate containers (PID, network, file system, user).
- Control Groups (cgroups) — Limit CPU, memory, and I/O usage per container.
- Union File System — Layers of read-only image + writable container layer.
Docker Architecture Diagram (Text)
[ Docker CLI (Client) ]
|
| REST API
v
[ Docker Daemon (dockerd) ]
|
_____|_____
| |
[Images] [Containers]
|
v
[ Docker Registry (Docker Hub) ]
Summary
- Docker uses a client-server model.
- The Docker Daemon manages all images, containers, networks, and volumes.
- The Docker Client sends commands to the Daemon via REST API.
- Docker Hub is the default registry to store and pull images.
Written by Shaikh Abdul Shahid
A Full-Stack Developer with experience in PHP, Laravel, JavaScript, and React.
Founder of Online Learner, sharing practical knowledge and programming tutorials.
Building and maintaining real-world web applications since 2017.
Your Feedback
Help us improve by sharing your thoughts
Online Learner helps developers master programming, database concepts, interview preparation, and real-world implementation through structured learning paths.
Quick Links
© 2023 - 2026 OnlineLearner.in | All Rights Reserved.
