Basic Docker Commands at a Glance

Last modified on July 31, 2021 14 sec read

We should know some basic Docker commands. Let’s have a look.

List of docker images:

docker images

List of running containers:

docker ps

Stop a container:

docker stop [conatiner name/ID]

Delete docker image:

docker rmi -f [image name/ID]

Stop and remove all of the Docker containers:

# stop all
docker rm -vf $(docker ps -a -q)

# delete all
docker rmi -f $(docker images -a -q)

Monthly Newsletter

One email a month, packed with the latest tutorials, delivered straight to your inbox.
We'll never send any spam or promotional emails.

Hey, I'm Md Obydullah. I build open-source projects and write article on Laravel, Linux server, modern JavaScript and more on web development.