Docker

Unnati GuptaUnnati Gupta
3 min read

#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 diagram

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 !!!

0
Subscribe to my newsletter

Read articles from Unnati Gupta directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Unnati Gupta
Unnati Gupta

๐Ÿ‘จโ€๐Ÿ’ป DevOps Engineer at 6D Technology Passionate about bridging the gap between development and operations, I'm a dedicated DevOps Engineer at 6D Technology. With a strong belief in the power of automation, continuous integration, and continuous delivery, I thrive in optimizing software development pipelines for efficiency and reliability. ๐Ÿš€ Exploring the DevOps Universe In my articles, I delve into the fascinating world of DevOps, where I share insights, best practices, and real-world experiences. From containerization and orchestration to CI/CD pipelines and infrastructure as code, I'm here to demystify the complex and empower fellow developers and ops enthusiasts. ๐Ÿ“ Blogging for Knowledge Sharing As a tech enthusiast and a lifelong learner, I'm committed to sharing knowledge. My articles aim to simplify complex concepts and provide practical tips that help teams and individuals streamline their software delivery processes. ๐ŸŒ Connect with Me Let's connect and explore the ever-evolving landscape of DevOps together. Feel free to reach out, comment, or share your thoughts on my articles. Together, we can foster a culture of collaboration and innovation in the DevOps community. ๐Ÿ”— Social Links LinkedIn: https://www.linkedin.com/in/unnati-gupta-%F0%9F%87%AE%F0%9F%87%B3-a62563183/ GitHub: https://github.com/DevUnnati ๐Ÿ“ฉ Contact Have questions or looking to collaborate? You can reach me at unnatigupta527@gmail.com Happy Learning!!