Docker Tutorial

Virtual Machine VS Container

Virtual Machine

A virtual machine is a software computer, which acts as a physical computer with an operating system and applications. In other words a computer within a computer. There is a host operating system and, on top of that a hypervisor. Hypervisor is a software, firmware or hardware that creates and runs virtual machines.

Advantages of VMs:

  • Multiple OS can exist in same machine simultaneously.
  • Flexible
  • Very mature

Disadvantages of VMs:

  • Not efficient
  • Difficult for fast deployment

Container

Container is a new form of visualization. Unlike VMs, containers share same resources of the host OS. Containers sit on top of a physical server and its host OS. Each container shares the host OS kernel and, usually, the binaries and libraries, too.

Advantages of containers:

  • Lightweight
  • Easy to start — only few seconds
  • Less OS maintenance
  • Efficient

Disadvantages of containers:

  • Cannot run a container with a guest operating system that differs from the host OS because of the shared kernel

--

--

--

Senior Software Engineer @Sysco LABS | Apache Committer and PMC Member @Apache Allura | Former Software Engineering Intern @WSO2 | CSE | UoM | SL

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Deshani Geethika

Deshani Geethika

Senior Software Engineer @Sysco LABS | Apache Committer and PMC Member @Apache Allura | Former Software Engineering Intern @WSO2 | CSE | UoM | SL

More from Medium

Docker for beginners

Install WordPress with Docker Nginx Reverse Proxy to Apache with SSL

Docker Introduction