WHAT IS DOCKER?
According to official docker documentation, docker is an open platform for developing, shipping and running applications.
The basic idea of docker is to significantly reduce the time between writing the code and deploying it in production.
When you deploy an application using docker, it runs inside containers. Each container stores up code and all the dependencies required to run that code. Due to this, Docker is also referred to as a container management service many times.
WHY USE DOCKER?
- Less Downtime:- Docker allows us to clean and repair applications without any significant downtime.
- Cost Effective:- With docker, multiple containers can run on single server which significantly reduces the use of resources and makes docker more cost effective
- Inbuilt version control system:- Docker has its inbuilt version control system. Using this feature you can roll back to your previous code anytime you want.
- Portability:- Docker provides portability. You can containerize your applications and run those containers wherever you want whenever you want.
- Security:- Docker provides security. Since applications run inside containers in docker that provide an isolated environment, without proper authorization one container would not be able to access another.
SOME IMPORTANT DOCKER TERMS
Docker Images:-Each container is a running instance of a docker image. A Docker image stores all the application code, config files, libraries etc. required to build and run an application.
Docker Hub:-Docker Hub is a repository that calls itself the world’s largest repository (of container images) and is used to store and manage container images publicly and privately.
DockerFile:-A file that is used to build docker images. This file contains instructions to create docker images.
Docker Daemon:-Docker daemon can be considered as the heart of docker. When a client sends a command it goes to docker daemon. Docker daemon is a service that is responsible for listening to all the API requests from Docker client in the form of docker commands like creating images ,running them in containers etc.
Docker Registry:-Docker registry is an open source storage or service that is to store docker images. Docker Hub is also a docker registry. Docker registry can also be used to track versions of docker images in repositories. It also allows you to tag each image for identification.
DOCKER ARCHITECTURE:-
Docker Architecture consists of 3 main parts:-
- Docker client
- Docker host
- Docker Registry
Docker Client:- Docker uses client-server architecture. Docker client is responsible for sending docker commands given by docker users to docker daemon.
Docker Daemon:- As Discussed earlier , docker daemon is responsible for listening commands or API requests from docker client. It is a service that runs on the host operating system.
Currently docker daemon can only run on Linux since it utilizes many Linux kernel features.
Docker registry:- Docker registry is used to store docker images. One popular example is docker hub for which docker is configured to work by default. You can pull any image from docker hub using docker pull command to use it. You can push any image you created, to docker hub using docker push command. You can also create your private registry.
CONCLUSION
According to me, Docker is worth a try for every developer out there as it saves time and makes deployment really simple. Containers are lightweight and use of containerization in docker helps to provide your applications an isolated and secure environment to run.
At last I would like to thank you for reading it and I hope it helped you. my next article will on process of installing docker on windows and Linux and learning to write dockerfile. Hope you will enjoy it too !!!!!!!!!!!
No comments:
Post a Comment