-
Notifications
You must be signed in to change notification settings - Fork 0
/
Chapter-4
24 lines (20 loc) · 1.37 KB
/
Chapter-4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Docker Vs Virtual Machines
--------------------------
- Operating systems has the structure like this
--------------
Applications
Os Kernel
Hardware
-------------
- Docker virtualizes the Application Layer
- Virtual Machine virtualizes the OS Kernel and Applications Layer both
- That means when you start a Virtual Machine, the VM boots up it's own Kernel and does not use the Host OS's Kernel.
- But When you start a docker it shares the OS Kernel and just virtualizes the Application layer.
- Due to this the Docker image size are lesser than size of Virtual Machine images, Because the VM needs to virtualize Kernel and Application Layer Both whereas
Docker images have to virtualize Applications Layer only.
- Also Docker containers start and run much fast as compared to Virtual Machines , because there is more Overhead for VM to bootup Kernel layer and then boot up application layer on top of it.
- IMPORTANT POINTS
- You can start VM of any OS on any other OS for example you can have a linux VM running on Windows Host OS.
- But you cannot run docker image of one OS type on another OS type host as you do in case of VM.
- Because while starting VM the VM does not care about host's kernel and boots up its own Kernel and thus able to run different OS on different Host OS.
- But in case of docker, they share the same Kernel of Host OS, so they cannot achieve this type of functionality.