Docker Tutorial
Introduction
Virtual Machine VS Container
Virtual Machine
A virtual machine is a software computer, which acts as a physical computer with an operating system and applications. In other words a computer within a computer. There is a host operating system and, on top of that a hypervisor. Hypervisor is a software, firmware or hardware that creates and runs virtual machines.
Advantages of VMs:
- Multiple OS can exist in same machine simultaneously.
- Flexible
- Very mature
Disadvantages of VMs:
- Not efficient
- Difficult for fast deployment
Container
Container is a new form of visualization. Unlike VMs, containers share same resources of the host OS. Containers sit on top of a physical server and its host OS. Each container shares the host OS kernel and, usually, the binaries and libraries, too.
Advantages of containers:
- Lightweight
- Easy to start — only few seconds
- Less OS maintenance
- Efficient
Disadvantages of containers:
- Cannot run a container with a guest operating system that differs from the host OS because of the shared kernel