What Is Docker And Concept Of Containers with Virtualization?

Docker, a booming technology replacing bars of application deployment and environment dependency. Most of the people wanted to know what actually/really DOCKER is? This Series will clear most of your doubts and will help you to learn Docker a bit. If you like to go for Docker Installation, Part2 is here

Part 2: How To Install Docker On CentOS/RHEL 6/7? And Learn Docker HUB Registration
Part 3A: Getting Familiar With Docker Commands Docker Terms: Docker – Part 3 A
Part 3B: Getting Familiar With Docker Commands Docker Terms: Docker – Part 3 B
Part 4: How To Perform Task Like Install, Run And Delete Applications Inside Docker Containers



so Let’s Start.

What is Docker?

Docker is a Container management service, which was initially launched in year March 2013. As this article picture says, Docker is basically an idea based on three keywords which are: develop, ship and run anywhere. The concept of Docker and the idea behind this technology was: develop the application, ship them as containers and deploy these containers anywhere.

Note: Docker needs kernel version 3.8 and higher.

Benefits Of Docker:

  1. Docker actually reduces the size of development environment by giving smaller traces of the operating system with the help of containers.
  2. Containers made the task easy for different the teams working on different area/units like development, QA, and Operations.
  3. The best part of Docker(containers) is that you can deploy containers anywhere and anywhere means cloud VMs and physical machines.
  4. These Docker containers are lightweight and are very easily scalable. Also, they take a fraction of a second to get a restart.
  5. Docker Uses host OS as these are light weighted VMs
  6. You don’t need to pre-allocate any RAM in containers

We are talking a lot about containers to its very important to know container before moving forward.


What are Containers?

Well, Containers are extremely lightweight virtual machines (VMs). these VMs are footprints/traces of a real operating system. Well, this technology is not a competitor of virtualization. It is actually using the concept of virtualization on an upper level. In fact, containers are to complement VMs.


Containers isolate the application from accessing the resources as these are VMs. Now here is a fact, containers concept is not really new to our world. we have been using the same concept around for a while in Solaris zones, FreeBSD jails and chroot. All of them were containers.

Execution of containers is governed by Container engines (The Docker Engine) and share the OS kernel and required libraries. Docker uses cgroups(control groups is a Linux kernel feature that limits, accounts for, and isolates the resource usage) and namespaces in the Linux kernel which impose resource isolation.

Once Docker is installed and services are started, the Docker daemon is responsible for building, running and distributing the Docker containers.
The Docker client interacts with the Docker daemon via sockets or through a RESTful API to do all the tasks.

Now Let’s Know More About Docker and its Components

Components Of Docker:

Internal components

There are three internal components that need to be understood

  1. Docker Images: Docker images are read-only templates; these images contain the operating system with the required libraries/tools and the applications.
  2. Docker Registries: Docker registries hold these images. These registries are like public/private repositories. The public Docker registry is called Docker Hub and has a huge collection of images with various applications embedded.
  3. Docker Containers: A Docker container holds everything that is needed for an application to execute. Containers are created from a Docker image. Similar to virtual machines, containers can be started, stopped, moved and deleted. Each container provides an isolated and secure environment for applications to run.

Useful Information About Docker:

Following are several other components of dockers depending upon OS and other factors.

  1. Docker for Mac − It allows one to run Docker containers on the Mac OS.
  2. Docker for Linux − It allows one to run Docker containers on the Linux OS.
  3. Docker for Windows − It allows one to run Docker containers on the Windows OS.
  4. Docker Engine − It is used for building Docker images and creating Docker containers.
  5. Docker Hub − This is the registry which is used to host various Docker images.
  6. Docker Compose − This is used to define applications using multiple Docker containers.

When Docker runs a container from an image, it adds a read-write layer to the image by using the Union file system.

The Docker registries contain many base images either created by Docker Inc. or the community. These base images are used to build custom images with applications injected. Docker images can be built using a recipe file called Dockerfile.

Docker Vs VM

As I said containers are based on the technology of virtualization but on an upper level but VMs and Containers differ on quite a few dimensions. Containers provide a way to virtualize an OS in order for multiple workloads to run on a single OS instance, whereas with VMs, the hardware is being virtualized to run multiple OS instances. Containers’ speed, agility, and portability make them yet another tool to help streamline software development like containers are based on virtualizing an OS in order for multiple workloads to run on a single OS instance, while in the case of virtualization, the hardware is virtualized to run multiple OS instances.

Also, Containers’ are good in speed, agility, and portability which makes them another tool to help streamline software development. This Image will help you a lot to understand the fact.

We will continue about Docker Installation and DockerHub in the next article Read Now.



Read More:

Part 1: What Is Docker And Concept Of Containers With Virtualization?
Part 2: How To Install Docker On CentOS/RHEL 6/7? And Learn Docker HUB Registration
Part 3A: Getting Familiar With Docker Commands Docker Terms: Docker – Part 3 A
Part 3B: Getting Familiar With Docker Commands Docker Terms: Docker – Part 3 B
Part 4: How To Perform Task Like Install, Run And Delete Applications Inside Docker Containers