A virtual machine runs a full guest OS (its own kernel) on virtual hardware provided by a hypervisor: strong isolation but heavier (gigabytes, slower startup). Type 1 hypervisors (KVM, Xen, ESXi) run directly on hardware; Type 2 (VirtualBox, VMware Workstation) run on a host OS.
A container is an isolated group of processes sharing the host kernel: lightweight (megabytes, near-instant startup) but with weaker isolation, and it can only run applications compatible with the host kernel.
Docker packages applications and their dependencies into images, runs them as containers, and pulls and pushes images through registries such as Docker Hub.
Loading…