Docker


Definition
Software designed to make it easier to create, deploy, and run applications by using containers. In other words, a docker is an open-source & containerization platform that packages your application and all its dependencies together in the form of a container to ensure that your application works seamlessly in any environment. Well now we know what is docker but what about containers? What is it ?. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. With DOCKER, you can treat containers like extremely lightweight, modular virtual machines and you get flexibility with those containers - you can create, deploy, copy, and move them from environment to environment, which helps optimize your application for the cloud.
Now another question arises this time “In what case we should use docker ?”
Well as we know docker is a container and definitely, it contains something in it like every container does. In docker container, it contains libraries and other dependencies for providing particular functionality so understand more let’s consider an example

Example:- A company needs to develop a Python Application. In order to do so, the developer will set up an environment with the Django server installed in it. Once the application is developed, it needs to be tested by the tester. Now the tester will again set up a Django environment from scratch to test the application. Once the application testing is done, it will be deployed on the production server. Again the production needs an environment with Django installed on it so that it can host the Python application. If you see the same Django environment setup is done thrice. This causes loss of time & effort and higher chances of version mismatch in different setups i.e. the developer & tester may have installed Django (old version), however, the system admin installed Django (newest version) on the production server.
Now try to deploy the same application using docker. In this case, the developer will create a Django docker image ( A Docker Image is nothing but a blueprint to deploy multiple containers of the same configurations ) using a base image like Ubuntu, which is already existing in Docker Hub (Docker Hub has some base docker images). Now this image can be used by the developer, the tester and the admin to deploy the Django environment. This is how Docker container solves the problem simply
Now we know that what is docker? What is docker container and see particle example
Now let's discuss docker’s advantage

Advantage
  1. Rapid development:-It can decrease deployment time. It is because of the fact that it can create a container for every process. So, even without worrying about the cost to bring it up again, it would be higher than what is affordable, Data can be created as well as destroyed. With the help of a Docker, we can build a container image and can further use that same image over every step of the deployment process. The advantage of it is the ability to separate non-dependent steps and also run them in parallel. In addition, the duration of time it takes from build to production may speed up notably.
  2. Security:- Docker makes sure that applications that are running on containers are completely set apart from each other, from a security point of view, by granting us complete control over traffic flow and management.
  3. Simplicity & Faster Configurations:- The way Docker simplifies matters is one of the key benefits of it. It gives flexibility to users to take their own configuration, put that into the code, and further deploy it without any problems. However, the requirements of the infrastructure are no longer linked with the environment of the application, as Docker can be used in a wide variety of 
    environments.
Limitation

  1. Run applications as fast as a bare-metal server:-In docker, An application cannot work as much as speed as similar to bare metal performance(speed)
  2. Run applications with graphical interfaces:-Default, docker, not provide GUI support 
Conclusion 
In the end, we see that what is docker? How can we use it? With a practical example also we see both its major pros and cons.

Comments

Popular posts from this blog

How to pass parameters in webhook?

Access and modify all the resources of our Wiki.js using WikiJS API

Fahrenheit to Celsius