Containers versus VMs
There is a definite line of distinction between VMs and containers. Containers allow you to isolate applications within an operating system environment. VMs allow you to isolate what appears to the users and represent it as a completely different machine to the user, even with its own operating system.
The following diagram illustrates the difference:
As we can see in Figure 10.1, in the case of a VM architecture, each virtual slice has its own operating system and all the slices sit on top of the hypervisor. In the case of container architecture, there is only one operating system installed for each instance. There is only one container engine, but multiple binaries and applications can be installed for each slice.
Containers share a kernel; all components are built into the kernel, which makes containers fast to start and, when compared to VMs, they generally have lower overhead. VMs have a more defined...