An Interest In:
Web News this Week
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
November 22, 2021 09:22 pm GMT
Original Link: https://dev.to/quentindamianino/useful-docker-commands-2mi0
Useful Docker Commands
Today I learned some docker commands, let me share it with you:
To stop all containers simply type:
docker kill $(docker ps -q)
docker ps
- list all running containers
flag -q
- displays only ids of these containers
docker kill
- stops containers
If you want to remove all containers use the command:
docker rm $(docker ps -a -q)
docker rm
- removes containers
flag -a
- lists all containers not only running ones
The rest is similar to previous command
To remove all docker images type:
docker rmi $(docker images -q)
docker rmi
- removes images
docker images - q
- lists ids of all images
Original Link: https://dev.to/quentindamianino/useful-docker-commands-2mi0
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To