docker delete occupied image
Stop all containers so that images can be deleted:
docker stop $(docker ps -a -q)
If you want to delete all containers, add another command:
docker rm $(docker ps -a -q)
. View the current What are some images
docker images
. To delete images, specify who to delete by the id of the image
docker rmi <image id>
If you want to delete untagged images, that is, those images whose id is <None>, you can use
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326512980&siteId=291194637
Recommended
Ranking