Containers vs virtual machines

There is a common misconception that container are the same as virtual machines (VMs), but this is wrong.

Containers virtualise OS kernels, whereas VMs virtualise hardware.

Virtual machines

  1. Use hypervisors to emulate real hardware
  2. Take up loads of space
  3. Require OS installation from user
  4. Cannot interact with host machine
  5. Can run multiple apps

Containers

  1. Do not emulate hardware
  2. Uses same OS and hardware as host machine
  3. Do not require OS install
  4. Take up less space
  5. Can only run 1 app at a time
  6. Can interact with host