Understanding Linux containers
As has already been demonstrated by now, there are two major types of virtualization: VM-based and container-based. We discussed VM-based virtualization in the previous section, 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, only that they are different in so many ways that they can hardly be called similar.
Containers versus VMs
As you already know, a VM emulates the machine's hardware and uses it as if there were several different 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 together with shared libraries and binaries needed for certain applications to run. The applications are contained inside the container, isolated from the rest of the system. They also share a network...