Understanding Docker Architecture

Understanding Docker Architecture

Hi Friends, In the previous two blogs we discuss What is docker, docker commands, Dockerfile and one project. In this blog, we are going to discuss docker architecture and its workflow.

So let's start our discussion.

Docker uses a Client-server Architecture. Whenever we installed docker on our machine, docker client and docker host were installed on our machine.

Docker has three components Docker client, Docker Host and Docker registry.

Docker Architecture

  1. Docker client(CLI): The docker client consists of docker build, docker pull and docker run. Docker users can interact with the docker daemon through the docker client. It uses commands and REST API to communicate with the docker daemon. A Docker client can communicate more than one Docker Daemon. In short, we can say whenever we need to communicate with the docker server we need to use the docker client.

  2. Docker host / Docker Daemon: In the docker host we have docker daemon and docker objects. Objects are Containers and images.

    Docker Daemon: Docker Daemon runs on the docker host. It listens to the

    docker client request and manages docker images, containers volumes etc.,

    e.g. if a docker client runs the docker pull ubuntu command. It will

    communicate with the docker daemon. The Docker daemon checks whether

    that image is available on the server or not. if it is not available then it will pull

    that image from the Docker registry or Docker hub.

    Docker daemon can communicate with other daemons to manage docker

    services

    Docker Objects :

    a. Docker Images: It is a source of a docker container. It is used to create

    containers. It contains OS(very small) + software.

    b. Docker Containers: Docker container is the running instance of a docker

    image.

  3. Docker registry (Docker Hub): It stores all the docker images which are used to create containers. registry can be public or private.

Docker Workflow

First, We need to create a Docker file by mentioning instructions to build a Docker image.

Now build the image.

From this Docker image, we are going to create a Docker container.

This Docker image can push this to the Docker hub as well.

This image can be pulled by others to create docker containers. We can create docker images from docker containers. Like this, we can create Docker images from either docker files or docker containers. We can create docker containers from docker images. This is the workflow of docker.

I hope you would like this blog.

Thank you for reading this blog.Happy Learning!!!!!

You can follow me on LinkedIn for my daily updates:- linkedin.com/in/parimal-pradhan-b62021168

Did you find this article valuable?

Support Parimal Pradhan by becoming a sponsor. Any amount is appreciated!