Why We Need Docker?

As we all know, Docker is an ecosystem where we can run Containers

I already explained some basics of containers in my previous article.

You can read my previous article using below link,

Let's understand why we need Docker first.

As software professionals, our ultimate aim is to deliver the software application to the client in an effective way.

The normal software delivery process steps are explained below.

  • Developers will develop the application and test it in their environment.
  • Once the developer side testing is over, the application will be delivered to QA environment
  • Once the QA verifies the application and if everything works as expected, the application will be delivered to the production environment.
  • If any issues are identified in QA environment, QA people raise an issue for the development team to investigate.

To develop an application, the developer needs a framework. The framework may have some dependencies like some OS features or some third-party libraries etc.

So, once the project is confirmed, normally the development people will discuss the feasibility of different frameworks and possible technologies.

Once the framework, technology, etc are confirmed, they will setup the development environment with the required framework and dependencies/libraries.

Then they will start the development of the application.

Once the development is completed, the dev team will test the application in a Development environment.

Next, the application will be delivered to the testing (QA) environment.

When the QA people start testing, they might face issues. The issue may not be due to our software errors.

There could be some other facts like dependencies.

Some dependencies may not be available on QA environment or dependency version mismatch are examples of such issues.

Another case is in development environment, some dependencies may already available by installing some other applications. So, our new application will work correctly without any issues in dev environment, but it will cause issues in QA or Production environment.

We have one solution which is commonly used and still using – Hypervisor (ie, Virtual Machines)

What we do using hypervisor is we have the physical hardware and we install the Host OS on it.

Then we will install the Hypervisor on top of it. After that, we can install multiple Operating systems on it.

Please refer to the diagram below.

On this Guest OS, we can do anything as normal OS. We can install software, dependencies, build applications, etc.

In this case, we deliver our application to the QA environment as a full image which contains our application, all dependencies and the complete OS to run our application.

Here, the advantage is we don’t have to worry about the environment where the application is running because we have given everything required to run our application.

Once the QA verifies our application, they will create copy of image and deliver to the production without worrying about the production environment.

In short, if the application runs in our environment, it will run in another environment also.

Everything seems good right? - Yes, Hypervisor concept is great!

But the problem is that think about we are installing multiple guest OS for different applications, all the Operating systems are sharing the same hardware.

So we are wasting resources like CPU, RAM, etc. Also, we are wasting money on licenses for OS and other applications if we are using licensed versions.

To resolve these issues, the concept Container is introduced.

The only difference between containers and hypervisors is that all the containers are sharing the same Host OS and hardware.

Please refer to the diagram below.

As we can see in the above diagram, here we have host OS only. We are installing Docker-container engine on top of it.

Then we are running multiple applications as containers using Docker.

This approach will reduce the cost and improve the utilization of resources in a better way.

We will learn more about Docker in the next article.

Thanks for reading!

Happy Learning Let's Develop An Angular Application - Angular Bootstrapping Process


Similar Articles