Docker

Hey Folks!

Have you worked with a Virtual Machine? Probably, yes! Have you worked with a container? It is still possible, but maybe you are a bit new to containers. This is all good! Even they have few similarites, they have much differences and pros/cons. Let’s check these!

Virtual Machines

Virtual Machines (VM) run on hypervisors and hypervisor software virtualizes the physical hardware resources and allocates them to virtual machines as virtual resources.

Even this technology works pretty well, it has quite important drawbacks. Each VM runs a full copy of an operating system. It means that each VM must be managed. Also, they are heavy to migrate, hard to manage and takes time on boot process.

They need maintenance and they are hypervisor dependent. For example, ESXi based machines cannot be moved to Hyper-V host seamlessly.

Virtual Machine Architecture
Virtual Machine Architecture

Containers

On the other hand, we have containers. Containers run on a supported operating system and managed by container engines. Technically there is no specific resource virtualization needed.

Containers are isolated using Linux processes, cgroups. namespaces and filesystem.

Container engine is a process to manage the lifecycle of a container.

Containers runs a minimal version of the necessary operating system processes within the container. Also, all of the required frameworks and libraries are included in the container image. This makes them portable and easy to scale.

Container Architecture
Container Architecture

Virtual Machine vs Container

#ProsCons
Virtual Machines– Good Community Know How
– Mature Technology
– Ideal for Most Applications
– License for Each VM
– VM Specific Management
– Heavy to Migrate
– Long Deployment Time
– Boot Process Takes Time
Container– Easy to Deploy and Migrate
– Lightweight Images
– Single Underlay Operating System
– Scalability
– Learning Curve
– Complex App Packaging
– Container Engine Management
Virtual Machine vs Container – Pros and Cons

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.