Docker for DevOps Engineers(Basic)
What is docker ?
Docker is a comprehensive software platform designed to facilitate the swift building, testing, and deployment of applications. It achieves this by encapsulating software into standardized units known as containers, each containing all the necessary components for the software to run seamlessly. These components include libraries, system tools, code, and runtime. With Docker, you can efficiently deploy and scale applications across diverse environments, ensuring the predictability and reliability of your code execution.
Docker simplifies the process of deploying and managing applications, making it a popular choice for developers and operations teams looking to improve consistency, efficiency, and collaboration in software development and deployment.
Tasks
As we have already installed Docker in previous days tasks, now is the time to run Docker commands.
Use the
docker run
command to start a new container and interact with it through the command line. [Hint: docker run hello-world]Use the
docker inspect
command to view detailed information about a container or image.Use the
docker port
command to list the port mappings for a container.Here we checked port details for nginx. we have checked process details using ps -a and we got the container id for nginx.
Use the
docker stats
command to view resource usage statistics for one or more containers.Use the
docker top
command to view the processes running inside a container.Use the
docker save
command to save an image to a tar archive.We could see that image has been stored as a .tar file on the local system.
Use the
docker load
command to load an image from a tar archive.These tasks encompass straightforward operations for the management of images and containers.
Thanks,
Kishor Chavan