Docker — Difference between Docker Container and Virtual Machine (VM)

Ashish Patel
DevOps Mojo
Published in
3 min readSep 12, 2020

--

Docker Container vs Virtual Machine (VM) — Comparing Docker Container and Virtual Machine

TL;DR

Containers and virtual machines have similar resource isolation and allocation benefits, but function differently because containers virtualize the operating system instead of hardware. Containers are more portable and efficient.

What is Docker?

Docker

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

Containers are an abstraction at the app layer that packages code and dependencies together. Multiple containers can run on the same machine and share the OS kernel with other containers, each running as isolated processes in user space. Containers are only megabytes in size and take just seconds to start, versus gigabytes and minutes for a VM.

Read Docker Container Overview for more details!

What is a Virtual Machine?

Virtual Machine

--

--

Ashish Patel
DevOps Mojo

Cloud Architect • 4x AWS Certified • 6x Azure Certified • 1x Kubernetes Certified • MCP • .NET • Terraform • DevOps • Blogger [https://bit.ly/iamashishpatel]