一行命令删除空的docker images

有些时候我们 docker build 镜像会出现很多 <none> 的残余 cache image 在我们的系统中。

可以使用 awk 来完成一行命令删除空的docker images

sudo docker images | awk '{if($1=="<none>") print $3}' | xargs sudo docker rmi

本文作者:Akkuman

本文链接:https://www.cnblogs.com/Akkuman/p/14472914.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   Akkuman  阅读(262)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
💬
评论
📌
收藏
💗
关注
👍
推荐
🚀
回顶
收起
  1. 1 404 not found REOL
404 not found - REOL
00:00 / 00:00
An audio error has occurred.