Docker

Most Commonly Used Docker Commands

“Unlock the full potential of Docker with essential commands”

docker run:
docker run nginx

This command is used to run the container from the nginx image

docker ps:
This command will list all the running containers & basic info. each container.

docker ps -a:
This commands will lists all running, stopped, exited containers.

docker stop:
This command is used to stop the container.

docker rm [name]/containerID:
This command will remove the container.

docker rmi nginx:
This command will remove the nginx image.

docker pull nginx:
This command will pull the nginx image from docker hub registery.

docker run -d nginx:
This command will run the nginx container in the background/detachted mode.

docker run -p 80:5000 nginx:
This command will publish the port.

docker logs containerID:
This command will show the logs of the specific container.

To be continued…

--

--

Syed Zain Rashid
Syed Zain Rashid

Written by Syed Zain Rashid

Hello, I'm Syed Zain Rashid, an engineer by profession, a passionate photographer & a technical writer.

Responses (1)