What is Docker?
Docker, a fastest growing technology replacing bars of application deployment and environment dependency. Most of the people wanted to know what actually/really DOCKER is?
Docker is a Container management service, which was initially launched in year March 2013. 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.
Docker needs kernel version 3.8 and higher. 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.
What are Containers?
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.
Benefits of Docker
There are various benefits of docker listed below.
- Docker actually reduces the size of development environment by giving smaller traces of the operating system with the help of containers.
- Containers made the task easy for different the teams working on different area/units like development, QA, and Operations.
- The best part of Docker(containers) is that you can deploy containers anywhere and anywhere means cloud VMs or physical machines.
- Docker containers are lightweight and are very easily scalable. Also, they take a fraction of a second to get a restart.
- Docker Uses host OS as these are light weighted VMs.
- You don’t need to pre-allocate memory to containers.
Components Of Docker
There are three internal components.
- Docker Images – Docker images are read-only templates. these images contain the operating system with the required libraries/tools and the applications.
- Docker Registry – Docker registry 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.
- Docker Container – 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.
VMs vs Docker Containers
As we discussed earlier containers are based on the technology of virtualization but on an upper level but VMs and Docker 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. Below Image will help you a lot to understand the fact.
In below table, you will get a more comprehensive view.
|Virtual Machine||Docker Container|
|Hardware level process isolation||OS level process isolation|
|Each VM has a separate OS||Each container can share OS|
|Boots in minutes||Boots in seconds|
|VMs are of few GBs||Containers are lightweight (KBs/MBs)|
|Ready made VMs are difficult to find||Pre built docker containers are easily available|
|VMs can move to new host easily||Containers are destroyed and recreated rather than moving|
|Creating VM takes a relatively longer time||Containers can be created in seconds|
|More Resource Usage||Less Resource Usage|
So far you have gone through an advanced overview of Docker. I hope you got a better understanding after this tutorial. Stay tuned for more tutorials.
See Also : How to Install Docker Engine on Ubuntu