Docker Architecture

Following diagram of Docker Architecture provides details about the major components in a docker platform, and how user commands docker daemon through client, etc. which we shall see in detail.

Docker Architecture

Docker uses server-client architecture. Where client is Docker Client(Command Line interface) and server process is Docker Daemon that is running on host. Both server and client can be on same computer.

Following are the different components in a Docker Platform.

ADVERTISEMENT

Docker Image [Build Component of Docker]

Docker Image is the build component of Docker. It is a read-only template. A docker image could contain an Operating System, a Web Server, a Web Application, etc.

Docker Container [Run Component of Docker]

Docker Container is the process that uses the template (Docker Image) and runs. A docker container, like a process, could be run, started, moved, stopped and deleted. Each container is isolated from others and is a secure application platform.

Docker Client

Docker command line interface is the Docker Client. A user like you or me can access the Docker client to give commands to Docker Daemon.

Docker Daemon

Docker Daemon does all the heavy lifting. Docker Daemon does build docker images, pull images from registry, run containers with images. You can access Docker Daemon via Docker Client.

Docker Registries

Docker Images could be stored in Docker registries. Docker officially provides public access to Docker Cloud and Docker Hub. They contain pre-built Docker images. You may pull those Docker Images and run with containers in your Docker Host.

User Building Docker Image File

User Building a Docker Image

User provides build command via Docker Client (Command Line Interface)

$ docker build -t <image_name> .

Docker sends build context to Docker Daemon that is running,

root@arjun-VPCEH26EN:~# ps -aef|grep docker
root      1220     1  0 Sep17 ?        00:06:57 /usr/bin/dockerd -H fd://

Docker daemon builds an image file, that is read only.

Conclusion

In this Docker Tutorial, we have learnt about the Docker Architecture, the components of the docker and how the commands flow from one component to other.