Docker-Terminology

Docker provides the ability to package our application and its runtime environment into a container which can be shipped easily. We have the ability to configure the runtime environment along with the application code . This makes it easy for us to run the application consistently in development environment, testing, and production. Before diving into Docker, we should be aware of its architecture and components.

  1. Docker Client
  2. Docker Daemon
  3. Docker Image
  4. Docker Registry
  5. Docker Container

Docker Architecture

Docker follows the client-server architecture. We interact with Docker server aka (Docker Daemon) using Docker clients like Docker command line interface (docker cli) client for performing operations. We can also interact with Docker Daemon using REST API clients like Postman. The commands that we execute using Docker cli will ultimately translate into REST API calls.

Docker Host

Docker host is a server / VM where Docker Daemon is running . All the containers , images and volumes gets stored there. All the containers that are running in the host will share the same IP address , but different host ports.

Docker Daemon

Docker Daemon (dockerd) is the Docker server which listens to API requests from the client . It is responsible for the following :

  1. Image management
  2. Container management
  3. Networking between containers
  4. Volume management

It is also responsible for communicating with other Docker Daemons located in other hosts.

Docker Clients

Docker Clients are used to interact with the Docker server i.e. Docker Daemon. There are Docker-client SDKs available for popular programming languages like , Go , Python ,Java and .Net. We can find the list of SDKs on the Docker official website.
In this post we will focus on docker-cli which comes with standard Docker installation.
Docker cli(docker) is one of the frequently used clients. Docker.exe/ docker command is used to interact with Docker Daemon .

Docker Image

Docker image is a read only template which contains a set of instructions for creating Docker container. A custom Docker image can be created from scratch or we can use an existing images from Docker registry and we can customize the image further.

Custom Docker Images are created by using Dockerfile , which contains a simple set of instructions that describe how container should be created. This file is published to docker registry for distribution and consumption. Each instruction in the Dockerfile will create a layer. When an instruction is added/modified corresponding layer only is modified. When we run/apply the changes from this image , only modified layers are updated without needing to download the entire image.

Docker container

Docker container is runtime instance of Docker image. We can create , start , stop, and delete containers in the Docker host. Each container is isolated from the other containers and each container can be accessed individually using IP address of the host and the port .

Docker Registry

Docker registry is a place where the images are stored. In other words, it is a repository of images. Docker hub is a public registry provided by Docker where most of the official images are available .

Since Docker is open source, cloud providers like GCP, AWS, and Azure have their own version of Docker registry where images are stored with their own additional features on top of what Docker is offering . In GCP it is called as Container Registry. In AWS it is called as ECR (Elastic Container Registry), in Azure it is called ACR (Azure Container Registry)

We can also host Docker registry on our own server for storing Docker images. By default the Docker hub is used . Whenever we use Docker pull , push or Docker run, we will interact with registry.

srnyapathi
srnyapathi
Articles: 41