In this post, we will see some Docker commands that they can help us in our Docker projects.
DOWNLOAD A DOCKER IMAGE
docker pull ‘name of image’
docker pull hello-world
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/1-3.png)
LIST DOCKER IMAGES
docker images
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/6.png)
REMOVE DOCKER IMAGE
docker rmi ‘image id’
docker rmi feb5d9fea6a5
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/7.png)
REMOVE ALL DOCKER IMAGES
docker rmi $(docker images -q) --force
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/8.png)
RUN DOCKER CONTAINER
docker run ‘name of image’
docker run hello-world
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/2-4.png)
START AND STOP A DOCKER CONTAINER
docker start ‘container id’
docker start 15659640e373
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/4.png)
docker stop ‘container id’
docker stop 15659640e373
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/3-2.png)
STOP ALL DOCKER CONTAINERS
docker kill $(docker ps -q)
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/1-4.png)
REMOVE A DOCKER CONTAINER
docker container rm ‘container id’
docker container rm b7f520543643
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/9.png)
REMOVE ALL DOCKER CONTAINERS
docker rm $(docker ps -a -q)
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/2-5.png)
LIST OF DOCKER VOLUMES
docker volume list
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/3-3.png)
DELETE A DOCKER VOLUME
docker volume rm ‘name of volume’
docker volume rm 0a05a0e36fe650ede59d032dbc38842dff3c8c55b26af10f87b2a32125f1c32d
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/4-1.png)
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/5-1.png)
DELETE ALL DOCKER VOLUMES
docker volume prune
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/6-1.png)
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/7-1.png)
LIST OF DOCKER NETWORKS
docker network list
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/a.png)
DELETE A DOCKER NETWORK
docker network rm ‘network id’
docker network rm 90e869ad21ac
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/b.png)
DELETE ALL DOCKER NETWORKS
docker network prune
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/06/c.png)
RUN A DOCKER COMPOSE FILE
Run a docker compose file called ‘docker-compose.yml’
docker compose up -d
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/07/1-1.png)
Run a docker compose file called ‘docker-compose-sql-server.yml’
docker compose -f docker-compose-sql-server.yml up -d
![](https://www.zoneofdevelopment.com/wp-content/uploads/2022/07/2-1.png)