
Earlier, when we developed an application, we used to deploy that application on any server. Now that server resources might be shared with multiple applications. And configuration on that server is combination of all the application deployed on it.
In this scenario, we were having below all the problems.
- When there are resources required by multiple applications, they compete for the resources and one application might get resource and other application might crash.
- If multiple applications are installed on one server, due to one application other application might have impact.
- Same way let’s assume all the applications are running on python environment. At the start all the applications developed on particular python version, for example python 3.7. Now one application needs to upgrade due to new functionality which is available in python version 3.8. So other applications which are still running on 3.7 also need to upgrade and might be few functionalities might not work and redesign also required.
- Also, we might not want to open the network from that server and not want to open all the IP/Port from that application but here we need to consider combination of all.
- When we want to migrate an application from one server to another server or when we want to upgrade the server, we need to take care of all the configuration we have done with all the installed application.
- For example, currently, we are running apps on premises and tomorrow we are moving clouds or currently we are running apps on Windows server and tomorrow we move to Linux server, we need to consider all the scenarios and huge change will require. So, it is not easy to migrate an application from one server to another server.
In this scenario, Docker will help to easily deploy our application.
Docker is basically a plain vanilla Linux system and it is up to you how you want to use it. Let’s say your app is designed in Python so install python on that Linux system and run your application. But this time we do everything by writing code in Docker file. So, when we start the container, it will first install all the required config and then start the application. so, in the future when you migrate an app to another server or from on premise to cloud it will first install all the required config and then start the application.
Advantages of Docker
- When we deploy docker container on any server, we can assign CPU and memory to that container. So, all the applications installed on that server are totally isolated. They all have their own network and OS; they don’t interfere with each other.
- It is easy to migrate apps, it is like an executable file but this time this will work on Windows, Linux and Mac on all platforms.
- With each container we can decide which development environment we require.
- With each container, we can have our own network, we can decide which network port we want to open and can be accessible out of that container.
Link for installing Docker
https://www.docker.com/products/docker-desktop/: What is Docker?In our next blog, we will discuss how to create basic docker container and how to deploy basic application in docker.
Also find video on this.