#day16
#90daysofdevopschallenge
What is a docker?
Docker is a platform for packaging, deploying, and running applications. Docker is a powerful tool that is used for packaging, deploying, and running applications. By using docker you can run your application successfully, you don't need to worry about the operating system and some other things.
Docker Image:
Docker Image is used to create a docker container. It is a non-editable file. It contains instructions for running containers.
Docker Container:
A Docker Container is created by using a docker image, inside that application is running. It is lightweight, standalone, executable software of packages that includes everything needed to run an application.
Note:- Docker Image and Docker container have relationships like class and object. The image is a blueprint of the container, you cannot edit images.
Docker Architecture:
Docker Architecture contains five components:
a) docker Daemon
b) docker client
c) docker Host
d) docker Registry
e) docker object
Docker Daemon:
It manages all the containers which running on the docker host. It takes input in the form of commands or APIs from the client and performs all the operations. It is responsible for running containers for managing the docker service. It also connects with the docker registry for images and networking.
Docker client:
The end user always connects to the docker client to perform the operations. when the end user runs any command on the client. It sends these commands on the docker daemon.
Docker Host:
Docker Host is used to provide an environment or it is an environment where we execute our all operations and run all applications.
Docker Registry:
Docker Registry has a collection of images. In docker two types of registry available
a) Public registry
b) private registry
Docker object:
In docker four types of objects are available
a) Docker images
b) Docker networking
c) Docker storage
d) Docker containers
❄Tasks:
Task 1:
Use the docker run
command to start a new container and interact with it through the command line. [Hint: docker run hello-world]
docker run command used to create the container. For creating a container you can use image name or image id.
Task 2:
Use the docker inspect
command to view detailed information about a container or image.
docker inspect command is used to check detailed information about the docker object like image, container, etc.
Task 3:
Use the docker port
command to list the port mappings for a container.
docker port command is used to map the port of the container. By using this you can access service outside the container.
Task 4:
Use the docker stats
command to view resource usage statistics for one or more containers.
docker stats command is used to check resource utilization by the container.
Task 5:
Use the docker top
command to view the processes running inside a container.
docker top command gives the information about the running process inside the container.
Task 6:
Use the docker save
command to save an image to a tar archive.
docker save command is used to save images in file format.
Task 7:
Use the docker load
command to load an image from a tar archive.
docker load command is used to untar the tar archive image file.
In the Next Article will go deep dive into Docker ......
Thank you for giving your precious time to read this blog/article and if any suggestions or improvements are required on my blogs feel free to connect on Linkedin Unnati Gupta. Happy Learning !!!