Docker V/S Virtual machine
There are different layers in an OS (windows, linux, mac) like - Application Layer (MS word, ppt, sheet) - Host OS Kernel - Hardware Docker can only virtualize the application layer, whereas a VM can virtualize both application and host OS kernel. hence docker is less overhead and lightweight compared to a VM. Docker has a disadvantage that is, it was initially made for linux machines, so most of the images present on docker are mostly linux based. A VM is compatable that is it can be run on any OS. If docker is built for linux systems and the images are linux based images, how are we (windows or mac) able to run them? The answer is docker desktop. The docker desktop adds a light weight hyper visor layer that internally uses a lightweight linux distribution.Hence we are able to run them.