Why we need Docker?
Tags: docker
Published: 2020-06-08 19:08:44

Hi, everyone this is my first post about _Docker_. I just get a chance to learn about docker and apply in the production at my company.


> Before learning docker. First we should clear that Why we need docker and some old school development process?

### The bad old days

Applications run businesses. If applications break, businesses suffer and sometimes go away. These statements get truer every day!

Most applications run on servers. And in the past, we could only run one application per server. The open-systems world of Windows and Linux just didn’t have the technologies to safely and securely run multiple applications on the same server.

So, the story usually went something like this... Every time the business needed a new application, IT would go out and buy a new server. And most of the time nobody knew the performance requirements of the new application! This meant IT had to make guesses when choosing the model and size of servers to buy.

As a result, IT did the only thing it could do - it bought big fast servers with lots of resiliency.Under-powered servers might be unable to execute transactions, which might result in lost customers and lost revenue. So, IT usually bought bigger servers than were actually needed. This resulted in huge numbers of servers operating as low as 5-10% of their potential capacity. **A tragic waste of company capital and resources!**.

### **Hello VMVare !**

VMware, Inc. _gave the world a gift - the virtual machine (VM)_. We finally had a technology that would let us safely and securely run multiple business applications on a single server.

All of a sudden, we could squeeze massive amounts of value out of existing corporate assets, such as servers, resulting in a lot more bang for the company’s buck.

> But... and there’s always a but! As great as VMs are, they’re not perfect!

The fact that every VM requires its own dedicated OS is a major flaw. Every OS consumes CPU, RAM and storage that could otherwise be used to power more applications. Every OS needs patching and monitoring. VMs are slow to boot and portability isn’t great - migrating and moving VM workloads between hypervisors and cloud platforms is harder than it needs to be.


### **Hello Containers!**

For a long time, the big web-scale players like Google have been using container technologies to address these shortcomings of the VM model.

 In the container model the container is roughly analogous to the VM. The major difference through, is that _every container does not require a full-blown OS_. In fact, all containers on a single host share a single OS. This frees up huge amounts of system resources such as CPU, RAM, and storage.

Containers are also *fast to start and ultra-portable*. Moving container workloads from your laptop, to the cloud, and then to VMs or bare metal in your data center is a breeze.

### **Linux containers**

Modern containers started in the Linux world and are the product of an immense amount of work from a wide variety of people over a long period of time. Just as one example, Google Inc. has contributed many container-related technologies to the Linux kernel. Without these, and other contributions, we wouldn’t have
modern containers today.


Some of the major technologies that enabled the massive growth of containers in recent years include **kernel namespaces, control groups, and of course Docker**. The modern container ecosystem is deeply indebted to the many individuals and organizations that laid the strong foundations that we currently build on!

### **Windows containers**

Over the past few years, Microsoft Corp. has worked extremely hard to bring Docker and container technologies to the Windows platform.

> In achieving this, Microsoft has worked closely with Docker, Inc.

The core Windows technologies required to implement containers are collectively referred to as Windows Containers. The user-space tooling to work with these Windows Containers is Docker. This makes the Docker experience on Windows almost exactly the same as Docker on Linux. This way developers and sysadmins familiar with the Docker toolset from the Linux platform will feel at home using Windows containers.


### **Windows containers vs Linux containers**

It’s vital to understand that a *running container uses the kernel of the host machine it is running on*. This means that a container designed to run on a host with a Windows kernel will not run on a Linux host. This means that you can think of it like this at a high level - Windows containers require a Windows Host, and Linux containers require a Linux host.

> Thanks for reading.

**_Next post will cover about Docker_**

_make sure you follow me for the updates and If you like the post then please like and give your feedback so that I can improve in my next post._