Docker is an Open Source tool where everyone contributes, customizes, and extends it.
Docker is quite similar to a virtual machine but with one major difference, instead of creating a whole virtual OS, docker allows us to use the same Linux kernel as the system that it is running on and will only ship the things that are not present in the host computer.
Docker is a tool that consists set of PaaS (Platform as a Service) products. Docker uses OS-level virtualization in order to deliver the software in packages which is known as Containers.
Docker uses containers to simplify build (Create), Ship( Deploy), and Run the applications. Containers are isolated from one another and allow us to package up with all the dependencies.
The containers can communicate with each other through well-defined channels. All containers are run by a single operating system kernel. And make use of few resources than virtual machines
The following diagram depicts the interface that docker uses to access virtualization features of the Linux kernel
Application and its dependencies are packaged in a virtual container by docker and this application can run on any Linux server. It provides great flexibility and allowing the application to run various locations.
Docker containers are lightweight and can run several containers simultaneously.
Docker architecture consists of components as follow:-
1 Docker Engine: A core part of the docker system is the docker engine. Docker engine follows a client-server architecture and is installed on the host machine.
Docker engine further consist of ->
- Server: known as dockerd which is a docker daemon. The server is responsible to create and manage docker images.
- Rest API: Rest API provides the instruction to docker daemon about what to do.
- Command Line Interface (CLI): A client through which docker command is entered
2 Docker Client: Docker user interacts with docker using client. Once any docker runs a command the client sends those commands to the dockerd daemon and the dockerd daemon carries them out. Docker commands use Docker API. Docker client can communicate with more than one daemon.
3 Docker Registry: In the Docker registry, Docker images are stored. Docker registry can be public as well as private. We can also create our own private registry. When we execute docker push command the docker image is stored on registry and hen we execute pull command the docker images is fetched from registry.
Some Benefits of Using Docker
- Continuous Deployment and Testing
- Compatibility and Maintainability
The Docker goal is to ease the creation, deploy and the delivery of an application using the so called Containers. The Docker Containers allow the developer/sysadmin to bundle an application with all needed components (libraries and other resources) and to deliver it as an independent and single package.