All Articles

What is the differences between Docker and Virtual Machines

Before Clarify the differences, let’s list the OS layers for the reference purposes.

  1. Application
  2. OS Kernel

The OS Kernel layer is responsible for communicating with the hardwares. Windows and Linux have different OS Kernels for sure.

Applications are different among Linux-based systems. Centos, Debian and Ubuntu have their own application layer. But the OS Kernel layer is the same.

The vital difference between Docker and Virtual Machine is Docker virtualized the application layer. Virtual Machine virtualized both the application layer and OS kernel layer. According the different virtualized setup, we can list some key points:

  1. Docker image size is much smaller
  2. Docker container is faster

Well, it looks like Docker just win it all. Please don’t forget below.

  1. Virtual Machine images support crossing-platforms.
  2. Docker images cannot support crossing-platforms without Docker Toolbox. It cannot support different system versions sometimes.

Now we could easily chose Docker and Virtual Machine based on the requirements.

Published Aug 25, 2022

Personal blog. I share frontend development technique and life.