Let’s dive into the Docker – Container World.
The virtualization industry is introducing many interesting and yet useful products to the market in order to reduce IT costs. The VMware revolution demonstrated how to effectively utilize hardware by using hypervisors and other sibling products. Similarly, openstack development is accelerating in order to reduce the cost of virtualization products by leveraging opensource technologies. Docker was not in the competition at the time, but it quickly became popular in the IT industry. The Docker concept is diametrically opposed to other existing hypervisor-based virtualization technologies. Docker is a software development tool that allows you to package an application and all of its dependencies into a standardized unit.
What is Docker?
Docker is an engine that runs containers. Docker gives you the power of an operating system while using very few resources. Docker facilitates application development in monolithic environments. In other words, developers can create applications, ship them, and deploy them anywhere. A virtual machine, physical server, or cloud instance could be the destination (AWS, Azure, Google Cloud).
Docker containers encase a piece of software in a complete filesystem containing everything it requires to run: code, run-time, system tools, system libraries, and anything else that can be installed on a server. This ensures that it will always run the same way regardless of the environment.
Let’s examine the Docker architecture.
Docker Engine (daemon) and Docker Client both run on the Docker host. The Docker client is used to start the Docker container. A container is nothing more than a ready-made image from the Docker repository.
Let’s see that how Docker is different from the Hyper-visor based virtualization.
When we compare the two images, we can see that the docker engine has replaced the hypervisor layer. Unlike VMware, the Docker engine shares the kernel with the container, so there is no need to create an additional Guest OS layer. This is similar but not identical to Oracle Solaris zones and Linux containers.
Sharing the Binary and Libraries :
Adding to that Docker also shares the Bins/Libs across the container.
Moving container across the cloud:
Docker engines enable portability across all platforms. This adaptability enables us to move the container from one cloud to another.
Here is the list of popular container technologies:
Oracle Solaris Zones: One of the most popular containers is Solaris zones. If you have worked on Solaris operating system, you might have experienced the flexibility of zones and easy management.
Cores OS : rkt is another container runtime offered by core OS.
LXC/LXD: This is Linux container manager. Docker uses LXC’s capabilities.
Docker is platform independent, running on both Windows and Linux. The Docker store is a location where anyone can obtain the necessary container images. Some of the images have a whole stack of them. If you want to host a web service, for example, you can use the web server image, which comes pre-configured with the web server, operating system, and database.
Advantages of Containers:
- VMs require a lot of overhead and are more resource intensive than containers. Containers are less heavy.
- Docker containers use a few megabytes of disk space, whereas virtual machines use gigabytes.
- It would be more expensive to deploy a VM for each application.
- Containers are a much more cost-effective solution than virtual machines because developers can deploy them themselves.
- Microservices, DevOps, and continuous deployment benefit greatly from container-based virtualization.
- Containers can be deployed more quickly than virtual machines. Because it’s the same as starting another process on the system.
- Containers can be rapidly scaled. It’s as simple as replicating the Docker image to another node.
Disadvantages of Containers:
- Virtual machines are highly secure because they run their own kernel, whereas containers share the kernel.
- In comparison to containers, hypervisor technology is more mature.
- Containers add to the complexity.
We will go over docker deployment, filesystem, and networking in greater detail in the following articles.