DEV Community

Cover image for Docker vs Virtual Machine
Rajdeep Ray
Rajdeep Ray

Posted on

Docker vs Virtual Machine

What is Docker?

Docker is a tool that uses containers to make the creation, deployment, and running of applications a lot easier. It binds the application and its dependencies inside a container.
Container

Docker

  • OS level process isolation
  • Each container can share OS
  • Boots in seconds
  • Containers are lightweight
  • Pre-built docker containers are easily available
  • Containers are destroyed and re-created rather than moving
  • Containers can be created in seconds
  • Less resource usage

What is Virtual Machine?

A virtual machine is a system that acts exactly like a computer.

In simple terms, it makes it possible to run what appears to be on many separate computers on hardware, that is one computer. Each virtual machine requires its underlying operating system, and then the hardware is virtualized.

Virtual Machine

  • Hardware-level process isolation
  • Each VM has a separate OS
  • Boots in minutes
  • VMs are of few GBs
  • Ready-made VMs are difficult to find
  • VMs can move to new host easily
  • Creating VM takes a relatively longer time
  • More resource usage

Watch this YouTube video for more details

Docker vs Virtual Machine

Top comments (1)

Collapse
 
zilti_500 profile image
Daniel Ziltener

My VMs boot in seconds, too... and really, there are tons available for you to use, e.g. on app.vagrantup.com. Best thing is, I am not restricted to Linux with it :) And on Windows and MacOS, docker just runs in a Linux-LM anyway.