Day 16 Task: Docker for DevOps Engineers.

Day 16 Task: Docker for DevOps Engineers.

#devops#docker

Docker

Docker is a software platform that allows you to build, test, and deploy applications quickly. Docker packages software into standardized units called containers that have everything the software needs to run including libraries, system tools, code, and runtime. Using Docker, you can quickly deploy and scale applications into any environment and know your code will run.

  1. docker run hello-world - Use the docker run command to start a new container and interact with it through the command line. [Hint: docker run hello-world]

  1. docker inspect <container-id> Use the docker inspect command to view detailed information about a container or image.

  1. docker port <container-id> Use the docker port command to list the port mappings for a container.

  1. docker stats <container-id> Use the docker stats command to view resource usage statistics for one or more containers.

  1. docker top <container-id> Use the docker top command to view the processes running inside a container.

  1. docker save: Use the docker save command to save an image to a tar archive.
  • Perhaps you want to save a Docker image rather than a container. If so, go with the docker save image command instead. Unlike the docker export command, the docker save command lets save one or more images to a tar archive directly and share it with anyone. Note that you can only save and load Docker images, not containers.

  • https://www.educba.com/docker-save/

  1. docker load: Use the docker load command to load an image from a tar archive

docker load: Load an image or repository from a tar archive (even if compressed with gzip, bzip2, or xz) from a file or STDIN. It restores both images and tags

  1. remove docker images: docker image rmi <image-id>

    1. docker ps checking for running containers.

    2. docker ps -a checking exited container (hidden containers)

    3. To delete the container first stop the container and docker rm <container-id>

Thank you for reading this Blog. Hope you learned something new today! If you found this blog helpful, please like, share, and follow me for more blog posts like this in the future😊😊

I would like to connect with you at linkedin.com/in/madhuri-patil-278b19118