Skip to content

Architecture

As mentioned earlier, Docker Engine uses a client-server architecture.

High-level Architecture

Here is the high-level architecture of Docker Engine:

text
<>INSERT DOCKER OFFICIAL ARCH IMAGE<>

Low-level Architecture

Here is the low-level architecture of Docker Engine, including all core and supporting components:

text
<>INSERT UPDATED ARCH IMAGE<>
Also, explain the flow for cntainer creation

Docker & The Linux Kernel

Docker Engine takes advantage of several features of the Linux kernel, such as namespaces, control groups (cgroups) etc., to enable containerization and resource isolation.

Container Creation Flow

  • User runs docker run in the terminal and Docker CLI converts this into an API request to the Docker Daemon.
  • The daemon checks if the image exists locally. If not, it pulls it from a registry.
  • The daemon requests containerd to create a container.
  • containerd, in turn instructs runc, which sets up namespaces, cgroups, and starts the container.
  • Once the container starts, containerd-shim takes over, detaching the container from runc and keeping it running independently, even if the Docker Daemon stops.