Docker Common delete command

1. Stop all of the container, so that it can delete images in which:

docker stop $(docker ps -a -q)

If you want to remove all the container, then add a command:

docker rm $(docker ps -a -q)

2. What some view current images

docker images

3. Delete images, specified by id image of who deleted

docker rmi <image id>

I want to delete untagged images, that is, those with id <None> of the image, then you can use

docker rmi 3}")

To delete all of the image of words

docker rmi $(docker images -q)

Reproduced in: https: //www.jianshu.com/p/718916080b2b

Guess you like

Origin blog.csdn.net/weixin_34218579/article/details/91279454