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 creationDocker & 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 runin 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
containerdto create a container. containerd, in turn instructsrunc, which sets up namespaces, cgroups, and starts the container.- Once the container starts,
containerd-shimtakes over, detaching the container fromruncand keeping it running independently, even if the Docker Daemon stops.
