#90 Day of Devops Challenge #Day 16 Task #TrainWithShubam

#90 Day of Devops Challenge #Day 16 Task #TrainWithShubam

Getting Started with Basic Docker Commands

1. Use the docker run command to start a new container and interact with it through the command line.

docker run -d Image
docker exec -it cont-id bash

2. Use the docker inspect command to view detailed information about a container or image.

docker inspect image
docker inspect container

3. Use the docker port command to list the port mappings for a container.

docker port containerId(or)containername

4. Use the docker stats command to view resource usage statistics for one or more containers.

docker stats container
docker stats

5. Use the docker top command to view the processes running inside a container.

docker top container

6. Use the docker save command to save an image to a tar archive.

docker save image > name.tar

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

docker load < file.tar