docker rmi $(docker images | grep "none" | awk '{print $3}')```
```powershell
[root@docker soft]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
rocketmq 3.2.6 453ef603e5f8 4 minutes ago 12.2MB
<none> <none> af57955c2620 8 minutes ago 12.2MB
<none> <none> ed8c75130b26 9 minutes ago 0B
hello-world latest d1165f221234 8 weeks ago 13.3kB
ubuntu 15.10 9b9cb95443b5 4 years ago 137MB
[root@docker soft]# docker rmi $(docker images | grep "none" | awk '{print $3}')
Deleted: sha256:af57955c2620fcfcbdbaf3b4058e5516d6eb3b6e84056727df061ea4fa5ff15c
Deleted: sha256:ed8c75130b269fad63ac13ce2359f82942557460ad3b1ffc655bb6673d6fb92b
Deleted: sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
[root@docker soft]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
rocketmq 3.2.6 453ef603e5f8 5 minutes ago 12.2MB
hello-world latest d1165f221234 8 weeks ago 13.3kB
ubuntu 15.10 9b9cb95443b5 4 years ago 137MB
[root@docker soft]#
docker删除tag为空的镜像
最新推荐文章于 2024-03-27 11:06:08 发布