Docker Architecture: Why is it important?
Abhishek Rana
DevOps Engineer specializing in automation and IT infrastructure deployment
Many of us believe that Docker is an integral part of DevOps. So there must be an amazing architecture behind this incredible tool. In this article , I will tell you everything you need to know about Docker architecture
Docker vs. Conventional Virtualization
A VM (Virtual Machine) is what?
A virtual machine (VM) simulates a physical server. A virtual machine uses the physical hardware of the computer to replicate the identical setting in which you would install your apps. You can utilize a system virtual machine (which runs a whole OS as a process, allowing you to replace a real machine with a virtual machine), or process virtual machines, which enable you to run individual computer applications in the virtual environment, depending on your use case.
What is Docker?
Docker is an open-source project that offers a software development solution known as containers. To understand Docker, you need to know what containers are. According to Docker, a container is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it.
Containers are platform-independent and hence Docker can run across both Windows and Linux-based platforms. The main purpose of Docker is that it lets you run microservice applications in a distributed architecture.
When compared to Virtual machines, the Docker platform moves up the abstraction of resources from the hardware level to the Operating System level. This allows for the realization of the various benefits of Containers e.g. application portability, infrastructure separation, and self-contained microservices.?
Docker’s Workflow
First, let us look take a look at Docker Engine and its components so we have a basic idea of how the system works. Docker Engine allows you to develop, assemble, ship, and run applications using the following components:
At first, Docker client talks to the Docker daemon, which performs the heavy lifting of the building, running, as well as distributing our Docker containers. Fundamentally, both the Docker client and daemon can run on the same system. We can also connect a Docker client to a remote Docker daemon. In addition, by using a REST API, the Docker client and daemon, communicate, over UNIX sockets or a network interface.
Docker Architecture
The architecture of Docker uses a client-server model and consists of the Docker’s Client, Docker Host, Network and Storage components, and the Docker Registry/Hub. Let’s look at each of these in some detail.
领英推荐
Docker’s Client
Docker users can interact with Docker through a client. When any docker commands runs, the client sends them to dockerd daemon, which carries them out. Docker API is used by Docker commands. It is possible for Docker client to communicate with more than one daemon.
Docker Host
The Docker host provides a complete environment to execute and run applications. It comprises of the Docker daemon, Images, Containers, Networks, and Storage. As previously mentioned, the daemon is responsible for all container-related actions and receives commands via the CLI or the REST API. It can also communicate with other daemons to manage its services.
Docker Objects?
1. Images
Images are nothing but a read-only binary template that can build containers. They also contain metadata that describe the container’s capabilities and needs. Images are used to store and ship applications.
2. Containers
Containers are sort of encapsulated environments in which you run applications. Container is defined by the image and any additional configuration options provided on starting the container, including and not limited to the network connections and storage options. Containers only have access to resources that are defined in the image, unless additional access is defined when building the image into a container.
3. Networks
Docker networking is a passage through which all the isolated container communicate. There are mainly five network drivers in docker:
4. Storage
You can store data within the writable layer of a container but it requires a storage driver. Being non-persistent, it perishes whenever the container is not running. Moreover, it is not easy to transfer this data. With respect to persistent storage, Docker offers four options:
Docker’s Registry
Docker registries are services that provide locations from where you can store and download images. In other words, a Docker registry contains Docker repositories that host one or more Docker Images. Public Registries include two components namely the Docker Hub and Docker Cloud. You can also use Private Registries. The most common commands when working with registries include: docker push, docker pull, docker run
As an IT Professional, I bring a dynamic blend of expertise in AWS Cloud and extensive experience in managing Networks and ensuring ITIL best practices , passionate about collaborating with external customers.
1 年Thanks for sharing