Before Clarify the differences, let’s list the OS layers for the reference purposes.
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:
Well, it looks like Docker just win it all. Please don’t forget below.
Now we could easily chose Docker and Virtual Machine based on the requirements.