In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how docker forces the batch deletion of image images from none. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
To get to the point, the problem I encountered is that I broke several image images in the development machine, and I think we have encountered similar problems. .
His name and tag are both for none, empty... I once read a post saying that if you mark him with a tag, you can kill him. Bullshit.
[ruifengyun@bj-buzz-dev01 extractor_docker] $[ruifengyun@bj-buzz-dev01 extractor_docker] $docker imagesREPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE 763e6d509697 2 minutes ago 1.123 GB 008ec8098c8d 21 minutes ago 471 MB
Then you will ask a question when you go to delete in batch. .
Docker rmi $(docker images | awk'/ ^ / {print $3}') Error: image_delete: Conflict, 64b4fa0cdd27 wasn't deletedError: image_delete: Conflict, 5a2b9b2294c3 wasn't deleted (… Slightly...) 2014-03-08 18:26:04 Error: failed to remove one or more images
The previous solution was to find an image-based container in docker ps-an and then stop it and rm him. But you'll find that it still doesn't work... .
[ruifengyun@bj-buzz-dev01 extractor_docker] $docker ps-a | grep 008ec8098c8df6a628cbe5e7 008ec8098c8d "/ bin/sh-c 'pip ins 14 minutes ago Exited (1) 13 minutes ago romantic_wozniak81cf08a442dd 008ec8098c8d" / bin/sh-c' pip ins 21 minutes ago Exited (1) 20 minutes ago dreamy_bardeen
When you docker rmi id, you will still be prompted that the deletion failed. In the end, I chose to delete all Exited in docker ps-a, and then start rmi. .. The result will be fine. I can't figure out what they have to do. theoretically, the failure of images should be that it thinks its container is related. Anyway, it is solved. Here are the orders written to delete in batches.
Add: the above reason is the official request of docker, docker rmi image_id can only delete unused image.
Docker ps-a | grep "Exited" | awk'{print $1}'| xargs docker stopdocker ps-a | grep "Exited" | awk'{print $1}'| xargs docker rmdocker images | grep none | awk'{print $3}'| xargs docker rmi
After emptying the remaining containers, there is no exception prompt to delete the images.
[ruifengyun@bj-buzz-dev01] $docker rmi-f 9503b09c1a70Deleted: 9503b09c1a707d29b084e18aa13ef5d66f43672e41dce4db5931cbf2a754daa1 Thank you for reading! This is the end of this article on "how docker forces batch deletion of image images of none". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.