Docker Benefits – Effective Ways To Overcome Problems Using Docker

Docker Benefits – Effective Ways To Overcome Problems Using Docker

Introduction to Docker

Docker is the new age of container virtualization which is rapidly growing in an IT organization. The three main characteristics which was driven with the help of docker are Build, Ship & Run. Let us first start with how the process evolves.

  • First developer writes a code which defines the dependencies and the requirement of an application in an easy to write docker file which is consumed in form a package.
  • Package is further shipped into a docker file which builds a docker image. So, whatever dependencies required for a particular application are present inside the docker image.
  • Now, docker image runs the docker container, which is the run-time instance of the docker image.
  • The docker image is loaded onto the Docker hub. Docker Hub is nothing but the git or version control repository for the docker image.
  • QE/Production team will pull the image from the Docker hub and prepare their own containers.

For Example –

The Docker images is the one which are huge in size and that require a lot of network bandwidth. We use this type of workflows in order to save that network bandwidth.

Over here we uses a Jenkins server. Let us see what exactly this workflow states –

Workflows to save network bandwidth

  • A developer write code within an easy-to-write docker file and then,
  • Push the code to the Git repository
  • Then the CI tool i.e. Jenkins pull the code from the Git and build an exact environment whatever we needed and that will fulfill all the dependencies required for the microservices and,
  • That environment id deployed onto the Testing, Staging, and Production.

Benefits of Docker In-Use –

There are the most common obstacles that the industry was facing:-

PROBLEM – 1: Inconsistent Environment – Developer who has built an application, that works fine on his own environment but when it reach Production there were certain issues with that application.

Now the question is – why this happens? What’s the reason behind this?

This happened because of the difference in computing environment between DEV, TEST (Staging) & PROD.This might be because of the software i.e. In Dev environment an upgraded software is there. But in PROD there might be present an old version.

Solution 1: Now, Let’s move towards the solution of not having the consistent environment for all. Docker Containers is the one who provides the consistent environment for all like DEV, TEST and PROD.

Docker Container is the one that packaging up the code and all its dependencies. Due to this, application rus so fast and reliable from one computing environment to another.

PROBLEM – 2:  Virtual machine for starting multiple Microservices – 

There are multiple virtual machines which presents on the top of the host machine and each of them contains the dependency for one microservices.

So, we must be thinking what is the cons here?

The major problem is, the wastage of resources like RAM, Disk space, Processor over VM and which are not utilized completely by the microservices running in this VM.

Let’s move further towards the solution of microservice problem –

Solution 2: We can run many of the microservices on the same VM by running the various Docker Containers for each microservices. For example – There is a host machine and top of that machine there is a VM and on top of that, there are several Docker Containers and each of them contains the dependencies for one microservice.

Basically, how DC functions, there is no need to define the preallocated resources such as RAM, Disk Space etc as it will take the resources on run time according to the requirement of the application.

Share this post