Day 16 : Docker for DevOps Engineers.
Docker:
Docker is an open-source containerization platform that provides a way to package an application and its dependencies into a single container image. These container images are lightweight, consistent, and include everything necessary to run the application, such as the code, runtime, libraries, and system tools. This ensures that the application behaves consistently across different environments, making it easier to develop and deploy software.
Containers: Containers are instances of Docker images.
Docker Images: Docker images are the blueprints for containers.
Dockerfile: A Dockerfile is a script that defines the steps to create a Docker image.
Docker Hub: Docker Hub is a registry service provided by Docker that hosts a vast collection of pre-built Docker images.
Container Orchestration: Docker also integrates with container orchestration tools like Kubernetes, Docker Swarm, and others. These tools help manage and scale containers in production environments.
Portability: One of the significant advantages of Docker is its portability. You can develop an application in a Docker container on your laptop, and then run the same container on a server or in the cloud, ensuring consistency in behavior.
Version Control: Docker images and containers can be versioned, making it easy to track changes and roll back to previous versions if necessary.
Tasks:
Use the
docker run
command to start a new container and interact with it through the command line.The
docker run
command is used to create and start a container from a Docker image.Use the
docker inspect
command to view detailed information about a container or image.The
docker inspect
command is used to display detailed information about Docker objects, such as containers, images, volumes, networks, etc.
Use the
docker port
command to list the port mappings for a container.The
docker port
command is used to view the public ports of a running container.
Use the
docker stats
command to view resource usage statistics for one or more containers.The
docker stats
command is used to display a real-time stream of resource usage statistics for running containers.Use the
docker top
command to view the processes running inside a container.The
docker top
command is used to display information about processes running within a containerUse the
docker save
command to save an image to a tar archiveThe
docker save
command is used to save one or more Docker images to a tarball archive.
Use the
docker load
command to load an image from a tar archive.The
docker load
command is used to load Docker images from a tarball archive.Thank you for reading :-)
Priyanka varshney
Subscribe to my newsletter
Read articles from priyanka varshney directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
priyanka varshney
priyanka varshney
๐ Hello, and welcome to my DevOps journey! ๐ I am Priyanka Varshney,๐ ๏ธ As an aspiring DevOps engineer, I'm all about bridging the gap between development and operations, making software delivery seamless and efficient. ๐ป๐ง On this Hashnode blog, I'll be sharing my learnings, experiences and adventures as I dive deep into the world of continuous integration, automation, and cloud technologies. โ๏ธโ๏ธ Let's connect, learn, and grow as a vibrant DevOps community. Follow my Hashnode blog, and let's embrace the DevOps adventure together! ๐ค๐