0% found this document useful (0 votes)
7 views1 page

Docker Commands

The document provides a step-by-step guide for using Docker commands. It includes instructions for checking the Docker version, listing running containers and images, pulling the latest Nginx image, and running a new Nginx container. Additionally, it advises checking the Docker Desktop to confirm the container is running.

Uploaded by

22ita25
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Docker Commands

The document provides a step-by-step guide for using Docker commands. It includes instructions for checking the Docker version, listing running containers and images, pulling the latest Nginx image, and running a new Nginx container. Additionally, it advises checking the Docker Desktop to confirm the container is running.

Uploaded by

22ita25
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

Start
open the docker desktop and go to command prompt

2.docker –version
Checks if Docker is installed and displays the installed Docker version.

3. docker ps
Lists currently running Docker containers.

4. docker images
Displays a list of all downloaded Docker images on your system.

5. docker pull nginx:latest


Downloads the latest version of the Nginx image from Docker Hub.

6. docker run -d --name my-nginx -p 8080:80 nginx


• Runs a new container in detached mode (-d).
• Assigns the name my-nginx to the container (--name my-nginx).
• Maps port 8080 on your host to port 80 inside the container (-p 8080:80).
• Uses the nginx image.

6. docker ps
Run docker ps to check if the my-nginx container is running

7. Go to the docker desktop, to check the docker container is running. if not, click the
start button below the actions.

You might also like