【发布时间】:2015-07-28 21:12:32
【问题描述】:
我正在使用docker,我在运行时发现
docker images -a
我有大量没有标签的图像,或者至少它们有一个标签
<none>
这些在我的磁盘上浪费了太多空间,现在 df -h 告诉我我的根目录已满。
我在网上找了一圈发现
docker rmi -f $(docker images -a | grep "^<none>" | awk '{print $3}')
至少会遍历所有没有的,但随后我会收到一大堆错误消息。
Error: response from daemon: Conflict, <id> wasn't deleted
Error: response from daemon: Conflict, <id> wasn't deleted
Error: response from daemon: Conflict, <id> wasn't deleted
Error: response from daemon: Conflict, <id> wasn't deleted
etc...
Error: failed to remove images: [<list of all the image ids that I want gone>]
这有点烦人。有谁知道这些没有标记的图像是什么,为什么我的命令没有删除它们?
【问题讨论】:
标签: awk grep docker delete-file image-file