# Day 16 : Docker for DevOps Engineers.

### [Docker](https://github.com/var-priya/90DaysOfDevOps/blob/master/2023/day16/README.md#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](https://github.com/var-priya/90DaysOfDevOps/blob/master/2023/day16/README.md#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.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697628538942/382af719-7c01-430a-ae5d-7f6d04233bb4.png align="center")
    
    * 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.
        
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697629502938/844ef85d-2530-44b8-92ec-f81d0c399e3f.png align="center")
    
    * 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.
        
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697629669880/88989e81-8dd3-4643-a9fc-3ad1392a6f71.png align="center")
    
    * 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.
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697629740150/53fe8342-b33b-491d-b688-5dfb7f79e081.png align="center")
        
    * 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 container
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697629785933/f09214c3-fd24-4d47-8ed9-f430cd2f4fe2.png align="center")
        
    * Use the `docker save` command to save an image to a tar archive
        
        The `docker save` command is used to save one or more Docker images to a tarball archive.
        
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697629840356/25d32695-6bd8-4dfa-9137-8cd3e2bff544.png align="center")
    
    * 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.
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697629893971/ed278f9f-c04a-4377-a25b-ae52375a36f1.png align="center")
        
        Thank you for reading :-)
        
        Priyanka varshney
