Skip to content

Instantly share code, notes, and snippets.

@zealfire
Created April 16, 2018 19:11
Show Gist options
  • Save zealfire/34e2463eedd95280ae619e601d3912a5 to your computer and use it in GitHub Desktop.
Save zealfire/34e2463eedd95280ae619e601d3912a5 to your computer and use it in GitHub Desktop.

I will try to explain you in very simple words.

Virtualization

Virtual machines have a full OS with its own memory management installed with the associated overhead of virtual device drivers. In a virtual machine, valuable resources are emulated for the guest OS and hypervisor, which makes it possible to run many instances of one or more operating systems in parallel on a single machine (or host). Every guest OS runs as an individual entity from the host system.

Docker Containers

On the other hand Docker containers are executed with the Docker engine rather than the hypervisor. Containers are therefore smaller than Virtual Machines and enable faster start up with better performance, less isolation and greater compatibility possible due to sharing of the host’s kernel.

test_image Advantages of using Docker over VM:

Portability Isolation Reusability Effective use of the Hardware Better DevOps Continuous Deployment and testing. They are often compared, perhaps because containers seem to be a "light" version of virtual machines. However, they are different. In fact, containers and virtual machines seek to solve two different problems. Initially, virtual machines were intended to solve a problem with service use. Mostly, they abstract hardware from the operating system and create a separate environment for operating systems and applications. Consequently, it is possible to consolidate "many" virtual machines in a single physical server.

In turn, containers aim to abstract applications from the operating system. They aim to make applications more portable. If we compare them though, containers can be more efficient than virtual machines at one or several levels: they start in fractions of a second rather than minutes; they take up MB rather than GB on the disk; and the same workstation can run 10 or 100 times more containers than virtual machines. However, you can –and it may be desirable to– deploy containers in virtual machines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment