Difference between Docker (Container) and Virtual Machine (Hypervisor)

Introduction

Often we keep getting confused as to why use one over another.

What are the actual differences! 

So I have tried to consolidate some of the basic differences in this blog.

Type Docker (Container) Virtual Machine
Behavior of application Run Isolated Isolated
Libraries Needed (example: curl, glibc) Uses it's own Uses it's own
Kernel Host's kernel Own kernel
Operating System (OS) Host's OS It's own OS acting as Guest OS


Docker kernel is same as Host's kernel?

Since all Linux distribution's use same underlying Linux Kernel and only differ in their user view (view can be UI or application software's). It is pretty easy to add different user view over another Linux OS kernel.

That's the main reason an OS on top on another OS is usually the case for virtual machine.
Due which, we cannot run FreeBSD or Windows via docker.


Container vs Virtual Machine


Now if you closely observe, in case of VM, we have every VM with their own Operating System, but docker is light weighted which uses the underlying OS's kernel and get's to facilitate a simulation as if it is a OS on itself.

Usecase of VM: Windows host with Ubuntu VM
Usecase of Docker: Ubuntu host with Redhat Docker



Another image



VM: Own kernel and hardware requirements like, RAM and CPU utilization.
Docker: Uses kernel and hardware of Host machine.


Thank's For Sticking By! :)



Disclaimer: Images shown in this post is picked from online image repository and not claiming any ownership of the same.

Comments

  1. Impressive Article. Thanks for sharing.
    Azure DevOps Training Online
    Azure DevOps Online Training
    Azure DevOps Online Training in Hyderabad
    Azure DevOps Course Online
    Microsoft Azure DevOps Online Training
    Azure DevOps Training in Hyderabad
    Azure DevOps Training
    Azure DevOps Training in Ameerpet

    ReplyDelete

Post a Comment

Popular posts from this blog

SSH using Chrome Secure Shell app with SSH identity (private key and public key)

Load Testing using Apache Bench - Post JSON API

NGinx + Gunicorn + Flask-SocketIO based deployment.