What is Linux Container ?
A Linux container is a set of one or more processes that are isolated from the rest of the system. All the files and libraries necessary to run them are provided from a distinct image. Linux containers are portable and consistent as they move from development, to test, and finally to production.
Let’s see the comparison between Virtual machine and Container.
In the above picture, left side we have Virtual Machine, and right side we have Container.
Virtual machine contains a Server (The Physical machine), on that Physical machine we have a Host OS, then we have a Hypervisor installed on Host OS. Hypervisor is going to manage Virtual machines (Guest OS) for you. You can have multiple Guest OS managed by Hypervisor on one Host OS.
Every Guest OS is completely isolated. It has its own binaries, libraries, it can run applications, it’s pretty heavy like an ordinary Operating system fully loaded with binaries, libraries, with kernel modules. It also takes time to boot-up, it needs to go through whole booting cycle, which takes minutes before your Guest OS is live.
Let’s see how Containers works. In the picture above right side is Container. You still have a Physical server, then you have Host OS, then you can have multiple Containers on your Host OS using the Docker Engine. Docker is one example software available, there are other softwares as well like CoreOS Rocket (Rkt), Odin etc.
Containers contains binaries, and libraries along with application. They don’t need to boot-up the full Guest OS. When you launch a Container, instead of waiting for minutes, it almost instantly starts the Container. So it’s a lot more lightweight than Virtual machine.
Containers also can be a couple of MBs with is way smaller than Virtual machine.
Containers on Cloud providers are still a little bit different than just running a Container on Host OS as shown in below picture.
Cloud providers still use Hypervisor to isolate the customers from each other.
Containers have taken the networking world by storm, offering a lightweight, more flexible alternative to the traditional virtual machine. The major difference between a container and a VM is that a container may share common files, while VM processes are discrete and atomic, even if storage and networking is virtualized and shared. VMs are more like islands; containers can be islands or communes.
469 total views, 1 views today