How Docker Evolved | History of Containerization
Tags: docker, kubernetes, devops, beginners
Published: 2024-01-11 01:04:21

**Hello, Dev Freinds! 💖**

Welcome to the series of [Beginner to Expert guide on Docker 🐋 & Kubernetes ☸️](https://dev.to/mukeshkuiry/series/25979)

From our [previous blog](https://dev.to/mukeshkuiry/why-you-should-learn-docker-kubernetes--2gim), I hope you got the **idea** of **why containers are used**. If you haven't yet read it, do check it out before jumping here.


![let us begin](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rq4kxbejvj6psj37oocg.gif)


Now let's go way back to the past and understand how we came up with this idea of containers.

## Bare Metal System

Before **containerization**, or even before **virtualization**, there is only one type of machine, which is usually called a bare-metal system.

In a bare-metal system, we usually have a host machine where we need to install **OS**, **binaries**, **libraries**, and **dependencies**, and then run applications on top of that.


![bare-metal system](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yuuwgfw8lipicn78kx0k.png)

But there are a lot of issues with this system.

1. Here in the figure, we can see the **shared level** of **binaries** and **libraries**. And now imagine you have two applications that require the same library but a **different version**. So, maintaining two versions of the same library is difficult. For that, we need to set different **environment variables** for different processes.

2. Due to these dependency issues, it's harder to manage multiple applications on the same machine. Which ultimately leads to **low utilization** of resources, which makes it an **inefficient system**.

3. As all the applications are running on the same host machine, the failure of one system can lead to the **failure of multiple applications** because they may **share the same dependencies**.

4. The **start-up** and **shut-down** times of these systems are **usually high**.

5. **Provisioning** a new system and **decommissioning** a system takes lots of time (**hours**).

## Virtual Machine

Then, around **2000–2005**, a new concept of virtual machines emerged to solve some of these problems.

In a virtual machine system, the system tries to divide the system resources into **multiple parts** and use them to run any **application independently**.

![virtual machine system](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qrz48h0chc6qjdtdzmaw.png)

There are also two types of virtual machine concepts.

**Type 1** virtual machines are basically where there is **no** underlying virtual machine, and in **Type 2** virtual machines, there is an **underlying operating system** for the host machine.


![types of virtual machine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7fja8k2oyohco0flq7ky.png)


So the main benefits of using a virtual machine rather than bare machines are:

- No dependency conflict
- Better utilization of resources, i.e., more efficiency.
- Small bluster radius
- Fast start-up and shut-down times
- Fast provision and decommission time (**minutes**).

## Container

To take the concept of virtual machines to the next level, we came across the concept of containers.

The main difference between a virtual machine and a container is that a virtual machine has its **own kernel**, while a container **shares the kernel of the host machine**.


![container](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9b36ro6tvwgs3bizwhq9.png)

The advantages of containers are:

It's **taking advantage of virtual machines** with faster startup, shutdown, provision (seconds), and decommission times. And also, it's **lightweight to use in development**.

## Virtual Machine + Container

The most common configuration you can see in real-life applications is that it **combines** the concept of a virtual machine with containers for **better performance** and **isolation**.


![Virtual Machine + Container](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z7zkiimwag8sv76gofb9.png)

## Container Orchestration

To take it one step further, Container Orchestration like **Kubernetes** is used to manage multiple containers.


![kub](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k6y8y1jo1daz1mdajjfl.png)

Here Node defines each independent container.

## Trade-Off

To summarize them all, I've prepared a chart that shows the benefits and difficulties of all the types of systems mentioned.


![Trade-Off](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wrl3kkgfcf88kgn212xz.png)

**I hope you liked the explanation of the history and evolution of virtualization.**

So, buckle up and go through this series to understand better. 🚀

See you soon in the next blog. 👋

**Connect with me on [LinkedIn](https://www.linkedin.com/in/mukeshkuiry) and [Twitter](https://twitter.com/mukeshkuiry7) for more. 🌐👩‍💻**