✦ For everyone, free.

Practical knowledge for real and everyday life

Home

2.1 Docker Engine Architecture

A focused guide to Docker Engine Architecture, connecting core concepts with practical Docker and container operations.

Docker Engine architecture refers specifically to the components that make up the Docker Engine itself — the daemon, the REST API it exposes, and the command-line client — as distinct from the broader Docker ecosystem that includes registries, orchestration tools, and desktop applications built around it.

The Three Core Components

The Docker Engine consists of the daemon (dockerd), a long-running background process that manages images, containers, networks, and volumes; a REST API that exposes the daemon's functionality; and the docker CLI, a client that consumes that API.

dockerd --version
docker version

The first command reports the daemon's version, while the second reports both the client and the server (daemon) versions it is communicating with — useful for confirming both sides of the architecture are present and compatible.

The REST API as the Real Interface

Every action the CLI performs is, underneath, an HTTP request to the daemon's REST API. This means anything achievable through the CLI is also achievable by calling the API directly, which is how other tools (orchestrators, IDE integrations, monitoring agents) interact with Docker without going through the CLI at all.

curl --unix-socket /var/run/docker.sock http://localhost/containers/json

This retrieves the same container listing docker ps would show, by talking to the API directly rather than through the CLI.

The Daemon's Responsibilities

The daemon manages the full lifecycle of images and containers: building images from a Dockerfile, pulling and pushing images to registries, starting and stopping containers, and managing the networks and volumes containers use.

docker build -t myapp .
docker network ls
docker volume ls
Engine vs. the Broader Docker Platform

The Docker Engine itself does not include a registry (Docker Hub is a separate, optional service), nor does it include multi-node orchestration beyond the built-in Swarm mode — these are part of the broader Docker platform or ecosystem, built around the engine rather than being part of it.

docker swarm init

Enabling Swarm mode extends the engine's capabilities to multi-node orchestration, but this is an optional mode layered on top of the same underlying engine architecture.

Why the Engine's Architecture Matters Practically

Understanding that the CLI is just one client of a documented API clarifies why so many third-party tools can integrate with Docker without needing the CLI itself — they only need to speak the same REST API the daemon already exposes.

Content in this section