How do containers differ from virtual machines?
BeginnerConceptContainers, VMs & Isolation Internals
Answer
A VM virtualizes hardware and runs a full guest OS with its own kernel on a hypervisor. A container virtualizes the OS: it shares the host kernel and only isolates processes, filesystem and network.
- VMs: GBs, boot in tens of seconds, strong isolation boundary.
- Containers: MBs, start in milliseconds, weaker isolation (shared kernel), far higher density.
More on Containers, VMs & Isolation Internals
What is a container, in one sentence?BeginnerCan a Linux container run a Windows application, or the reverse?IntermediateWhat are Linux namespaces? Name the ones Docker uses.BeginnerWhat are cgroups and what do they do for containers?BeginnerWhat is PID 1 in a container and why does it matter?IntermediateHow do you see which namespaces a container uses and enter them from the host?Intermediate