XenonStack

A Stack Innovator

Post Top Ad

Monday 9 December 2019

Docker Container Overview and Docker Compose


Docker is an open platform tool to make it easier to create, deploy and execute the applications by using containers. Docker Containers allow us to separate the applications from the infrastructure so we can deploy application/software faster.
Docker has main components which include Docker Swarm, Docker Compose, Docker Images, Docker Daemon, Docker Engine.
We can manage our infrastructure in the same ways as we manage our applications. The Docker is like a virtual machine but creating a new whole virtual machine; it allows us to use the same Linux kernel.
The advantage of the Docker platform is to ship, test, and deploy code quicker so that we can reduce the time between writing code and execute it in production.
And the main important thing about Docker is that its open-source, i.e., anyone can use it and can contribute to Docker to make it easier and more features in it which aren’t available in it.

Docker Container Components

The Core of the Docker consists of Docker Engine, Docker Containers, Docker images, Docker Client, Docker daemon, etc. Let discuss the components of the Docker.

About Docker Engine

The Docker engine is a part of Docker which create and run the Docker containers. The docker container is a live running instance of a docker image. Docker Engine is a client-server based application with following components -
  • A server which is a continuously running service called a daemon process.
  • A REST API which interfaces the programs to use talk with the daemon and give instruct it what to do.
  • A command-line interface client.
The command-line interface client uses the Docker REST API to interact with the Docker daemon through using CLI commands. Many other Docker applications also use the API and CLI. The daemon process creates and manage Docker images, containers, networks, and volumes.

The need for Docker Daemon

The docker daemon process is used to control and manage the containers. The Docker daemon listens to only Docker API requests and handles Docker images, containers, networks, and volumes. It also communicates with other daemons to manage Docker services.

Using Docker Client

Docker client is the primary service using which Docker users communicate with the Docker. When we use commands “docker run” the client sends these commands to docker, which execute them out.
The command used by docker depends on the Docker API. In Docker, the client can interact with more than one daemon process.

Docker Images

The Docker images are building the block of docker or docker image is a read-only template with instructions to create a Docker container. Docker images are the most build part of the docker life cycle.
Mostly, an image is based on another image, with some additional customization in the image.
We can build an image that is based on the centos image, which can install the Nginx web server with the required application and configuration details which need to make the application run.
We can create our own images or only use those created by others and published in the registry directory. To build our own image is very simple because we need to create a Dockerfile with some syntax contains the steps that needed to create the image and make to run it.
Each instruction in a Dockerfile creates a new layer in the image. If we need to modify the Dockerfile we can do the same and rebuild the image, the layers which have changed are rebuilt.
This is why images are so lightweight, small, and fast when compared to other virtualization technologies.
Continue Reading:XenonStack/Blog

No comments:

Post a Comment