Docker
What is Docker?
Docker is an open- platform for developing, shipping, and running applications. It separates your applications so, you can easily deliver software packages that are known as containers.
The software that hosts the containers is called the docker engine.
It is the type of OS-level virtualization. It runs on Linux, Windows, macOS.
How to setup Docker on a machine?
1. Before installing Docker desktop, we must see the system requirements through the search of “install docker windows”.
2. When you click on the docker toolbox on the windows option, it gives you the complete procedure for the installation of the docker.
3. Click on “ download from docker hub “.
4. Then, sign up by creating your own docker Id, email, and password. Then the new webpage will open.
5. From this page, we can download the docker desktop for windows.
6. Also, through https://www.docker.com we can also be redirected to the same page.
7. When you click on the above link, the “get started “option will be shown. Click on that option and then download docker desktop for mac and windows.
8. In the process of installation, you will be shown on the configuration page. Click “ok “. After some time, the installation will succeed.
9. After installation, you’ll be shown the docker desktop on your home page.
10. When you click on the docker icon when it is running, you will come across a set of options like a sign-in option with your Id. Go through that and sign in.
11. After signing in with your own docker id, then go to the command prompt and check the version which you installed.
Components :
Docker software mainly consists of three components.
1. Software: the docker daemon(dockerd) is a persistent process that manages Docker containers and handles the objects. A Daemon can also communicate with other daemons to manage docker services.
2. Objects: To assemble an application in the docker, various entities are used which are known as objects.
1.Docker container
2.Docker image
3.Docker service
3.Regestries: It is a repository for Docker images. To upload the images, docker clients connect to registries.
There are mainly two public registries:
1.Docker hub
2.docker cloud.
docker run :
The docker run command is to change the command that a container runs.
Docker engine:
It is a client-server application with three major components.
1. Server: it is a long-running program called a daemon process.
2. A Reset API: which specifies interfaces that programs can use to talk to the daemon and instruct it what to do.
3. A command-line interface(CLI): it uses the docker reset API to control or interact with the docker daemon.
Benefits:
1. Lightweight and portable.
2. It can run on both physical or virtual machines.
3. It is faster.
4. Cost-effective.
5. It supports client-server architecture.