From the course: Learning Docker

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Containers vs. virtual machines

Containers vs. virtual machines - Docker Tutorial

From the course: Learning Docker

Containers vs. virtual machines

- [Instructor] Containers are often thought of as virtual machines but smaller. This is an understandable, but incorrect, comparison. Let's explore the differences between the two. The biggest difference is that virtual machines virtualize hardware whereas containers virtualize operating system kernels. What does this actually mean? This diagram describes how applications run on containers shown on the left and virtual machines shown on the right. Virtual machines run on a platform called a hypervisor. The hypervisor's main job is to translate operations on emulated hardware within virtual machines like memory processors, disks, et cetera, to operations on real hardware within their hosts. This allows for a lot of flexibility, but comes at the cost of disk space as the emulated memory and disks need to live somewhere. Because virtual machines are actual virtual computers, you're responsible for installing the operating…

Contents