如何删除没有标签的Docker映像? [英] How to delete a Docker image that has no tag?

查看:147
本文介绍了如何删除没有标签的Docker映像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从五个月开始就使用码头工具,我从来没有遇到这个问题。我有2张相同ID的图片,所以我想删除一个我已经不赞成的人了。事实是,它没有ID,当我尝试做

  dk rmi -f gitlab-lab:5005 / xs / mgmt-docker-gui 

我收到错误:

 守护进程的错误响应:没有这样的图像:gitlab-lab:5005 / xs / mgmt-docker-gui:latest 
pre>

那么如何删除这个,而不是另一个谁有相同的ID?

  jerome / mgmt-docker-ui最新537b5ea5aa7b 4天前476 MB 
gitlab-lab:5005 / xs / mgmt-docker-gui< none> 537b5ea5aa7b 4天前476 MB


解决方案

我相信你是引用标签< none> 的图像。如果是这样,那么您可以使用 dangling 切换来删除。

  docker rmi $(docker图片-f dangling = true -q)


I use docker since 5months and I never got this problem. I have 2 images with the same ID so I want to delete the one who I know that it's deprecated. The thing is that it has no ID and when I try to do

 dk rmi -f gitlab-lab:5005/xs/mgmt-docker-gui

I got an error :

Error response from daemon: No such image: gitlab-lab:5005/xs/mgmt-docker-gui:latest

So how can I delete this one and not the other one who has the same ID ?

jerome/mgmt-docker-ui                latest              537b5ea5aa7b        4 days ago          476 MB
gitlab-lab:5005/xs/mgmt-docker-gui   <none>              537b5ea5aa7b        4 days ago          476 MB

解决方案

I believe that you are referring to image with tag <none>. If so, then you can delete using dangling switch.

docker rmi $(docker images -f dangling=true -q)

这篇关于如何删除没有标签的Docker映像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆