Containers vs. Virtual Machines (VMs): Differences you should know

Andrei Ciorba
Andrei Ciorba November 28 2020 #docker

share this on:

  

What are the differences between Docker vs. virtual machines? Find our more by watching our video below:


 

[Video Transcript]

Let's move on to today's topic on Docker containers. The very first thing that you hear people talking about when Docker is introduced is probably going to be something like the slide right here.

The difference between Containers and Virtual Machines (VMs) and while they are inner workings.

Yes, and very low details of how Containers work are definitely a topic that you can talk about for the entire week long training one of the biggest differences between VMs (Virtual Machines) and containers lies in the operating system. 

With virtual machines you encapsulate the operating system in each virtual machine as you most likely know this already, and those operating systems run on what is called virtual Hardware, which is just a software abstraction made possible by the Hypervisor. 

And the hypervisor is a component, well, actually just an operating system in itself. In fact some drivers that slice the real hardware resources of your host of your server and present them as virtual resources to the virtual machines.

As a result those virtual machines think that they are running on physical dedicated hardware and they behave and are managed like Standalone servers.

Now on the other hand the other half of the slide containers do not encapsulate the operating system but they all run on top of and rely upon one single operating system on your host.

So they all share one single OS and they rely on kernel-level mechanisms from that operating system to ensure proper isolation, proper security between containers and a somewhat similar Behavior to VMs.

This is why you will encounter terms like OS-level virtualization or user space virtualization or isolated user space instances when reading about containers because it's actually a type of virtualization that happens on top of the operating system. 

Now, the next question would be something along the lines of okay. So what are containers good for and since we have a slide like this where we introduce containers by comparing them to VMs you might think that well containers could be used as a replacement. Or VMs, right?

Well, the answer is yes and no. Yes, you could use them as VMs and no you should not.

If you want to learn more about Docker, register now for one of our courses:

New call-to-action

 

share this on: