Interview Prep/Docker/Containers, VMs & Isolation Internals

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.
All Docker questions Roadmap: Docker & containers

More on Containers, VMs & Isolation Internals