Virtual Machines, Docker, Container, and Image Explained

These are the terms which you have heard a lot about nowadays in the software world. This is my effort to explain these terms simply. Why they can be of great help to you.

Virtual Machines as Wikipedia states

In computing, a virtual machine (VM) is the virtualization/emulation of a computer system. Virtual machines are based on computer architectures and provide the functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination.

Let me put that easily, virtual machines are the copy/ soft copy of a computer system which you can run on top of the computer which runs fully independent of the original system. Each virtual machine provides its virtual hardware, including CPUs, memory, hard drives, network interfaces.

Virtual Machines are mainly used for testing, creating operating system backups, and running software or applications on the operating system.

Docker as Wikipedia states

Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels.Because all of the containers share the services of a single operating system kernel, they use fewer resources than virtual machines.

Let me put that in a simple way, Docker is the tool to package the software or application in a container that is lightweight and can run on the different operating system, that said, but the kernel needs to be the same in this case. Windows container can run on Windows only and Linux container can run on Linux only.

So, in the above paragraph, we have used the term Image and Container. Let understand what are they,

Image as in real life is a snapshot of the things at a particular time interval. In software, images are the immutable(cannot be changed) snapshot of the application. Image is the collection of libraries and other configuration bundle together.

Container, like the real container, is the box which provide the safe environment for the image to run as an isolated process.

So, Docker comes into the picture to package these image and run this container on top of the machines. Docker has three essential things.

Conclusion Virtual Machine and Docker are both very useful tools depending on the use case. Virtual machines are very much helpful in case of testing and running software which you do not want to interact with your real system and on the other hand, Docker easy out the deployment process and sharing your application with other people.


#100DaysToOffload #Docker #VirtualMachines