Understanding Linux containers
As we have demonstrated in the previous chapter, there are two main types of virtualization: virtual machine (VM)-based and container-based. We discussed VM-based virtualization in the previous chapter, and now it is time to explain what containers are. At a very basic, conceptual level, containers are similar to VMs. They have similar purposes – allowing an isolated environment to run – but they are different in so many ways that they can hardly be called similar. Let’s compare these two concepts in more detail.
Comparing containers and VMs
As you already know, a VM emulates the machine’s hardware and uses it as if there were several machines available. By comparison, containers do not replicate the physical machine’s hardware; they do not emulate anything.
A container shares the base OS kernel with shared libraries and binaries needed for certain applications to run. The applications are contained inside the...