The Wayback Machine - https://web.archive.org/web/20240910102903/https://www.geeksforgeeks.org/architecture-of-docker/
Open In App

Architecture of Docker

Last Updated : 25 Apr, 2023
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Pre-requisite: Docker

Docker makes use of a client-server architecture. The Docker client talks with the docker daemon which helps in building, running, and distributing the docker containers. The Docker client runs with the daemon on the same system or we can connect the Docker client with the Docker daemon remotely. With the help of REST API over a  UNIX socket or a network, the docker client and daemon interact with each other. 

Docker Architecture

 

What is Docker Daemon?

Docker daemon manages all the services by communicating with other daemons. It manages docker objects such as images, containers, networks, and volumes with the help of the API requests of Docker.

Docker Client

With the help of the docker client, the docker users can interact with the docker. The docker command uses the Docker API. The Docker client can communicate with multiple daemons. When a docker client runs any docker command on the docker terminal then the terminal sends instructions to the daemon. The Docker daemon gets those instructions from the docker client withinside the shape of the command and REST API’s request.

The main objective of the docker client is to provide a way to direct the pull of images from the docker registry and run them on the docker host. The common commands which are used by clients are docker build, docker pull, and docker run.

Docker Host

A Docker host is a type of machine that is responsible for running more than one container. It comprises the Docker daemon, Images, Containers, Networks, and Storage.

Docker Registry

All the docker images are stored in the docker registry. There is a public registry which is known as a docker hub that can be used by anyone. We can run our private registry also. With the help of docker run or docker pull commands, we can pull the required images from our configured registry. Images are pushed into configured registry with the help of the docker push command.

Docker Objects

Whenever we are using a docker, we are creating and use images, containers, volumes, networks, and other objects. Now, we are going to discuss docker objects:-

Docker objects

 

Docker Images

An image contains instructions for creating a docker container. It is just a read-only template. It is used to store and ship applications. Images are an important part of the docker experience as they enable collaboration between developers in any way which is not possible earlier.

Docker Containers

Containers are created from docker images as they are ready applications. With the help of Docker API or CLI, we can start, stop, delete, or move a container. A container can access only those resources which are defined in the image unless additional access is defined during the building of an image in the container.

Docker Storage

We can store data within the writable layer of the container but it requires a storage driver. Storage driver controls and manages the images and containers on our docker host. 

Docker Storage

 

Types of Docker Storage 

  1. Data Volumes: Data Volumes can be mounted directly into the filesystem of the container and are essentially directories or files on the Docker Host filesystem.
  2. Volume Container: In order to maintain the state of the containers (data) produced by the running container, Docker volumes file systems are mounted on Docker containers. independent container life cycle, the volumes are stored on the host. This makes it simple for users to exchange file systems among containers and backup data.
  3. Directory Mounts: A host directory that is mounted as a volume in your container might be specified. 
  4. Storage Plugins: Docker volume plugins enable us to integrate the Docker containers with external volumes like Amazon EBS by this we can maintain the state of the container.

Docker Networking 

Docker networking provides complete isolation for docker containers. It means a user can link a docker container to many networks. It requires very less OS instances to run the workload.

Types of Docker Network 

  1. Bridge: It is the default network driver. We can use this when different containers communicate with the same docker host.
  2. Host: When you don’t need any isolation between the container and host then it is used.
  3. Overlay: For communication with each other, it will enable the swarm services.
  4. None: It disables all networking.
  5. macvlan: This network assigns MAC(Media Access control) address to the containers which look like a physical address.

Previous Article
Next Article

Similar Reads

How to Use Docker For Fault Tolerance with Docker Replicas?
Docker is a set of platform-as-a-service products that use OS-level virtualization to deliver software in packages called containers. A cluster of docker engines is called a swarm. Docker Swarm is a cluster management and orchestration feature embedded in the Docker Engine. Docker ReplicasDocker replicas refer to running multiple instances of a doc
4 min read
How to Use Docker For Cross-Platform Containerization with Docker Buildx?
Docker has completely modified the manner in which software program is evolved and deployed, with the aid of introducing containerization generation. In order to package programs with their dependencies and make certain consistency of conduct across many contexts, packing containers offer a compact and portable solution. Deploying containerized app
7 min read
How to Use Docker Content Trust to Verify Docker Container Images
The world of containerized applications is based on trust. You rely on Docker images to be exactly what they say they are: secure, reliable, robust, and built with the right elements. But just like you can not just blindly trust any random ingredient in your kitchen, similarly the Docker image needs a kind of verification so we don't need to be con
12 min read
Docker Compose vs Docker Swarm
Docker is one of the most widely used container-based software on the market. Docker is an open-source platform for creating, deploying, and managing containerized applications. Docker allows us to simply bundle our apps into containers and can be deployable on any platform that supports docker software acting as a platform independent. What Is Doc
6 min read
Docker CLI vs Docker Desktop
Docker is an open-source platform. It is used to containerize applications. This is done by packaging applications along with their dependencies into containers that can be easily deployed. Users interact with Docker primarily using either the Docker CLI or the Docker Desktop Application. In this article, we'll be looking into each one in detail an
5 min read
Docker: How To Use Bash With An Alpine Based Docker Image?
Docker is a tool that is used to encapsulate the application with all its dependencies, called Docker containers. On the other hand, Alpine Linux is a lightweight and minimal Linux distribution. Here in this guide, I will first discuss what Docker is. Then I will discuss what Alpine is. After this, I will walk you through the different steps to ins
5 min read
Docker - Deploying WebApps on Docker
Docker applies abstraction at the software layer of the operating system to create an instant and portable environment that includes everything you need: a Linux kernel, libraries, system tools like grep or sshfs, plus applications (web servers/services) and all dependencies needed by those applications (e.g., database engines). When deployed, thes
9 min read
How To Use Docker Security Tools To Secure Docker Container Images
Docker is a tool that is used to package the application and its dependencies into compact units called Docker containers. In this guide, I will first discuss what a docker is. Then I will discuss a security tool called Trivy, which is used to scan and detect Docker image vulnerabilities. After this, I will walk you through the different steps to d
11 min read
Docker - Publishing Images to Docker Hub
Docker is a container platform that facilitates creating and managing containers. In this article, we will see how docker stores the docker images in some popular registries like Dockerhub and how to publish the Docker images to Docker Hub. By publishing the images to the docker hub and making it public it gives users more flexibility in creating e
8 min read
Docker - Using Public Repositories To Host Docker Images
Docker is a software platform for creating isolated virtualized environments for building, deploying, and testing applications with ease. In this tutorial, we will learn how to host public repositories on docker hub which is a hosted repository service provided by Docker for finding and sharing container images. Just like GitHub allows the hosting
10 min read
Docker - Docker Container for Node.js
Node.js is an open-source, asynchronous event-driven JavaScript runtime that is used to run JavaScript applications. It is widely used for traditional websites and as API servers. At the same time, a Docker container is an isolated, deployable unit that packages an application along with its dependencies, making it highly scalable and maintainable.
12 min read
Getting started with Spring Boot 3, Kafka over docker with docker-compose.yaml
We will create two Spring Boot 3.x applications (Producer and Consumer) requiring Java 17 to get started. We need a queuing service to pass messages from the producer Spring service to the consumer Spring service. Here, we will use Kafka. Confluent provides Docker images that are easy to use for setting up the Kafka environment. Since we will use a
5 min read
Docker Logs Inside the Docker Container
While running containers, it is important to know about various information like running processes generated by the container. Docker logs allow us to get this information regarding the containers. While it's pretty straighforward to check logs directly from Docker CLI, here we will see how to check logs from within a container. What is Docker?Dock
5 min read
Docker Tips : about /var/run/docker.sock
Docker has thus gained lots of usage today in software development. It allows developers to create, deploy, and run their applications in isolated environments. Such isolation will guarantee consistency between development, testing, and production environments and, finally, app security and scalability. A central part of the functionalities of Dock
8 min read
How To Use Docker Desktop To Deploy Docker Containerized Applications
Docker Desktop is an user-friendly tool that simplifies the deployment of Docker containerized applications on your local machine. It provides a graphical interface for managing containers, images, and volumes, making it accessible for developers and DevOps professionals. In this guide, we will walk you through the essential steps of using Docker D
9 min read
Docker Start vs Docker Run
Docker is a platform as a service(PaaS) that allows engineers to use OS-level virtualization to automate the deployment of applications inside lightweight and portable packages called containers. The containers have a very big advantage as they allow apps to run on different platforms effortlessly, and reduce the old headache of "it runs on my mach
7 min read
Docker - Kubernetes Architecture
Pre-requisite: Docker and Kubernetes Docker and Kubernetes are two of the most popular tools in the field of containerization and cluster management, respectively. In this article, we will understand how Docker and Kubernetes work together to provide a seamless experience for developers and operators. Docker is a tool that allows developers to pack
4 min read
Understanding the Docker Desktop Architecture and Linux Building Block for Containers
In this article we are going to do a technology deep dive and start understanding the foundational Linux kernel features that software like Docker is using to make the containers work and provide those isolated environments that we all use. then towards the end of this section, we'll also take a look at the docker system architecture. The building
9 min read
How To Docker SetUp Three Architecture Setup ?
This article provides an easily understandable explanation on using Docker to build a three-tier architecture. In this 3tier architecture we use WordPress as frontend application and MySQL as backend database and both the application with a customized network in docker. It provides a step-by-step guidelines for seamless integration and configuratio
5 min read
How to Link Multiple Container in Docker ?
Docker is a free software created by Docker Inc. and it enables clients to create free and confined environments where the users can deploy their applications. A container is a standard unit of software that packages up code and all its dependencies from one computing environment and runs it quickly and reliably into another computing environment.
2 min read
Installing Helm & Kubernetes in Docker
Helm is simply a package manager for Kubernetes. It helps you manage Kubernetes applications — Helm Charts helps you define, install, and upgrade even the most complex Kubernetes application. Implementation: Follow the below steps to install Helm and Kubernetes in Docker: Step 1: Installing Docker First, download the Docker.exe from the official si
2 min read
Docker - Containers & Shells
Docker is a set of platforms as a service (PaaS) products that use Operating system-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries, and configuration files; they can communicate with each other through well-defined channels. All containers are
5 min read
Build, Test and Deploy a Flask REST API Application from GitHub using Jenkins Pipeline Running on Docker
Nowadays even for small web applications or microservices, we need an easier and faster way to deploy applications that is reliable and safe. These applications may be simple but they undergo rapid changes from the business requirement, to handle these changes we definitely need a CI/CD pipeline for deployment. Jenkins is one such tool that can mak
4 min read
Docker - Setup in RHEL8 for Python
Developing an application or software requires starting several microservices in one machine. So if you are 10 of those services then you require 10 VMs on that machine. How Docker solves the above problem? With help of docker, you can run multiple microservices in the same VM by running multiple docker containers for each microservices. Containers
2 min read
Docker Networking
Pre-requisite: Docker Docker Networking allows you to create a Network of Docker Containers managed by a master node called the manager. Containers inside the Docker Network can talk to each other by sharing packets of information. In this article, we will discuss some basic commands that would help you get started with Docker Networking. Docker Ne
5 min read
How To Use Docker for Machine Learning?
Docker is a containerization platform that allows you to package your machine learning code and dependencies into an image that can be run on any machine. Docker allows your application to be separated from your infrastructure. The image that you created is portable, so you can run it on any machine that has Docker installed. Docker for MLWe are go
5 min read
Difference Between Docker and Virtualization
Years back when organizations were planning to transform their projects with emerging technologies like Cloud or On-Premises Server, they came up with two solutions i.e. Docker and Virtual Machines. Both of them were introduced to solve these organizational issues using Containers. They simplify the deployment process of applications and microservi
7 min read
Microsoft Azure - Running an App inside a Docker Container Image
In this article, we'll learn how to run an app inside of a container with Docker. For this, you need to set up Docker on your local Dev machine, by going to docker.com, and installing the Docker desktop application for your specific operating system. We can use the Docker Pokemon to pull an image from the Docker Hub onto your local machine. Here, w
2 min read
Docker - Installation on Windows
In this article, we are going to see how to install Docker on Windows. On windows if you are not using operating system Windows 10 Pro then you will have to install our docker toolbox and here docker will be running inside a virtual machine and then we will interact with docker with a docker client To understand this let us look at the left side of
2 min read
How to Push a Container Image to a Docker Repository?
In this article we will look into how you can push a container image to a Docker Repo. We're going to use Docker Hub as a container registry, that we're going to push our Docker image to. Follow the below steps to push container Image to Docker repository: Step 1: The first thing you need to do is make sure that you've signed up for Docker account.
2 min read