Docker: Architecture

Yeldos Balgabekov
2 min readMay 31, 2020

--

This article is a of a series on “Docker: Deep Dive”. See all content

Docker uses Client-Server Architecture, in the other words, it has two different binaries for the client and for the server. Thus, Docker client is talking to Docker server daemon. At the same time, Docker daemon takes care of building, running, and distributing containers.

Also, we can interact with both of the apps through a REST API: either with UNIX Sockets or Network interface. Thus, executing a docker command you first talk to the client that then submits a request to the server daemon.

http://dockerlabs.collabnix.com/beginners/components/server_client.html

dockerd (docker deamon/server)

dockerd is a process running on your host that manages containers. It listens for the Docker API requests and organizes the work for the docker objects. Examples of such objects are images, container, networks, volume.

docker client

Docker provides us with a handy CLI tool that enables us to send requests to the daemon with the very easy. Thus, for instance, when we run docker container run [docs], the docker client (the CLI) will send a command to dockerd.

docker registry

Every time you run your app with containers, if the specified image is not found on the server it is getting pulled from the registry. That image is then used to build the container.

Docker registry is a some kind of a repository for docker images (snapshots of environments). The official and public registry from Docker is DockerHub You can push your own docker images there as well as to pull those of others. In the other words, it is very similar to what GitHub does, yet with images instead of code. Again as with github, you are not tight to use only that service for remote repositories, but something like GitLab or BitBucket as well, the same story is with the Docker images registries. Examples of such registries are ECR from AWS, Container Registry from Google, or Container Registry from GitLab.

https://docs.docker.com/get-started/overview/

The picture above should clearly show a bigger picture of how the Docker components interact with each other. Client to submit the commands to the docker server, Server is managing all the work, and Registry is where we store the images (snapshots of your apps/environments).

--

--