Today Docker is becoming highly popular buzzword in the field of Virtualization and Cloud computing. Today there are so many businesses that are already moving their production application from virtual machines environment to Docker, In addition there are several banks who have already shifted their beta Docker deployments to fully production deployments.
What is Docker?
As the Dockers says, Docker is, Build, Ship and Run, Any App, Anywhere! In layman’s terms, running an application with Docker is like running an application in its own little bubble. This means that application can run in isolation, so if it breaks or goes down, it doesn’t affect anything else.Virtual Machines have a similar use. So with a Virtual Machine you run an operating system on top of the base operating system or a bare metal Hypervisor. So if the VM breaks (or an application running on the VM breaks), the base system is isolated from this, and can stay up.How containers differ from VMs is that containers only virtualize the resources theapplication needs, VMs virtualize an entire OS. So containers use less of the base OS resources. Virtualization as we know it before the shared kernels arrived.
- Type 1 hypervisors run directly on the host hardware. These hypervisors provide and manage resources among different running guest operating systems. Thus, the guest operating systems run two levels above the hardware.
- Type 2 hypervisors run within the existing operating systems called host operating systems. In such hypervisors, the hardware sharing is emulated within a running process.
Containers provide virtualization while sharing the same kernel and, much like chroot, try to isolate the environment for a program. They cannot access the file system environment outside their own isolated file system. They combine the namespace, chroot and cgroup mechanisms to provide isolation to a user. Thus the user has control over its own environment and has an illusion of owning a physical hardware machine, where in fact they are sharing resources with different users. Since containers run on the same kernel, therefore each container runs only one level above the hardware.
Read Docker: In the Spotlight – Part 2 to understand about Docker Containers.