There are different containers models or we can say delivery models according to the different operating systems. Few of them are listed as:
• Linux: Docker, LXC Linux containers, OpenVZ,
• Windows: Sandboxie
• Cloud PaaS: Warden/Garden (in Cloud Found-
ry), LXC (in Openshift)
B. NEED FOR CONTAINERS
By the invention of virtual machines, various issues related to cloud computing like scheduling, packaging, resource management have been resolved. As the applications can be made isolated with the help of virtual machines, due to this security can be improved [15]. Cloud needs to answer the requirements of application management and packaging . Containers can give solution to these requirements in efficient way.
A container is a package that contains ready to deploy applications parts, business logic, and middleware as shown in the given figure [16].
Containers are highly scalable and safe to use. These are easy to deploy when we compare it with the virtual machines. So we can say Docker is an open source platform that helps users and programmers to isolate application dependencies.
V. CONTAINERS VS VIRTUAL MACHINES
Both of these technologies generally provide an illusion that a single host machine can be used to run multiple machines. All of these machines run under the host machine need to be isolated from one another and also from the host machine. The difference comes in that how both of these technologies able to achieve isolation between the different machines. A brief difference is shown in the given figure, according to which we can say that containers generally executed on host OS and virtual machines runs on hypervisor. A container engine generally combined itself with the kernel of the host OS.
Further both of these can be compared based of certain factors like:
Operating system support:
As per the architecture shown above for both the virtual machine and docker containers, differs in the operating system support. A virtual machine contains a host OS which is able to run multiple guest OS inside different virtual machines, whereas containers needs to be hosted on a single server that contains a shareable OS. The guest OS can be anything irrespective of the available host OS. On the basic of this we can say that both of these technologies can be used in different situations according to the requirement. If one wants to runs many application on a single OS kernel then Dockers needs to be preferred and when user have many applications that needs support of different operating systems then Virtual machines should be preferred. As the host OS is shared between the containers, it leads them to boot in very short span of time. So we can say maintenance overhead of containers is less than virtual machines [17].
Host/Guest Architecture:
Virtual machine provides the facility to run the guest kernel that is different from the host kernel, that’s not possible with containers as kernel needs to be shared.
Booting:
Booting started as it started in normal operating system, speed depends on the applications. Containers can start up rapidly when we compare it with virtual machines as they are less resource centric.
Standardization:
Virtual machines are generally like a complete standard operating system having all the features. On the other hand containers are more application specific [18].
Portability:
Docker containers are the separate package which can run the needed application. As Dockers does not contain any separate operating system, so applications can be ported out easily across various platform which is not possible in case of virtual machines. Containers can be switch on and off within seconds, much faster than that of virtual machines because of their lightweight nature. Due to this feature containers can be easily deployed on the servers. Virtual machines on the other side are separate server instance that is isolated with their operating system. It’s not possible to port the virtual machines across various platforms due to compatibility issue. So we can say for the developers where application development is the primary focus Docker containers needs to be preferred.
Need of Servers:
Multiple server requirements in dockers is not as much as compared to virtual machines. As dockers are light weighted and contains only the applications, so there is no need of multiple servers. These applications can be run on a single physical server. But if user needs to run multiple applications on different server instance, and these servers needs specific operating system then user needs the virtual machines. Virtual machines contains all the necessary library files, supporting files and most importantly the entire operating system to work upon which is required by the particular application. So we can say lesser number of virtual machines can be accommodated to a same server if we compare it with the Dockers. As the number of virtual machines hosted on a single server are less than dockers, so we can say that the server density is lesser with virtual machines. Due to this feature one can say that dockers are cost effective application hosting solution when we compare it with virtual machines.
Performance Evaluation:
Both of the virtualization techniques have their specific purposes so comparison of performance evaluation is not fare.
But we can say as the containers are lightweight virtual architecture, thus they are less resource intensive when we compare them with virtual machines. Due to this start up time of containers is very much less than that of virtual machines. Resource allocation in containers is not permanent as resource usage can vary with the load. Replication and elasticity is also much easier in containers in comparison of virtual machines as containers do not require a separate operating system.
Security:
Security can be an overhead in the case of dockers, as the host kernel is shareable among all the containers, so a single vulnerable point can leads to hacking of entire server. Due to this security concern super user access to the applications and also running them with root user privileges is not recommended. While in the case of virtual machines such applications are run those needs more security and privilege. Apart from this as we know that each virtual machine runs under separate or its own operating system, due to which they can use their own security features and kernel features.
Low redundancy:
Containers just need the applications to run on host operating system unlike virtual machines where entire operating system needs to install before proceeding. This results in lots of duplicity of various components. Thus on the basis of this we can say that containers results in low redundancy when we compare them with the standard virtual machines.
Hardware Access:
Applications run under the containers have direct access to the hardware, which is not possible with virtual machines.
Resource Distribution:
Containers generally require very less resources only those which are required at that particular time, unlike virtual machines which require permanent resource allocation before start-up of virtual machines. So we can say resource distribution is optimal in case of containers [19].
Memory Usage:
Virtual machines needs complete operating system for each of the guest, due to which it require large memory when we compare it with containers. Containers uses less memory as it share the host operating system.
Files and library sharing:
Each virtual machine has its own OS, which contains large no. of files and libraries. These files cant shared between different virtual machines. On the other side containers runs under host OS, no separate OS is needed by each application. So files and libraries can be shared using linux commands.
All these differences can be summarize in the table 1 given below
In this paper, virtual machines are compared with containers on the basis of various parameters. Both the techniques are based on virtualization and solve specific purpose, in some cases virtual machines can be use and in some cases containers can be preferred. If the requirement is to provide the high availability and scalability then containers are more suited. If the requirement is to create secure system then virtual machines needs to be preferred. While working in heterogeneous environment docker containers focuses on applications and dependencies associated with them, whereas flexibility can be achieved using the virtual machines. So we can say both of these technologies are not to replace one another but these can be used simultaneously depending upon the requirement of the user. While adopting these two technologies we can say VM provides better Iaas solution (machine portability, Security and greater isolation) and Docker provides better Saas solution (application/software portability) to end users. If one can build hybrid architecture then it will surely benefit to variety of users.