简体   繁体   English

“码头工人图像”是否检索具有相同ID但标签不同的重复图像?

[英]“docker images” retrieves duplicated images with same ID but different tags?

Why is this happening and how can I solve it? 为什么会发生这种情况,我该如何解决?

$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              latest              14f60031763d        2 weeks ago         119.5 MB
ubuntu              <none>              14f60031763d        2 weeks ago         119.5 MB

You can remove all dangling images with docker image prune . 您可以使用docker image prune删除所有悬空的图像。

Why is this happening? 为什么会这样呢? I can't really think of a good reason. 我真的想不出很好的理由。 What actions lead to this? 什么动作导致了这一点?

'Docker images' command will display all the images including the old versions. “ Docker images”命令将显示所有图像,包括旧版本。 That's default behaviour. 这是默认行为。 However, you can use filters to list specific images, I cannot see any direct command to list only latest images. 但是,您可以使用过滤器列出特定的图像,我看不到任何直接命令仅列出最新的图像。

You can also try like this, For example, docker images java:8 which will give you the image of java with version 8. 您也可以这样尝试,例如docker images java:8,它将为您提供版本8的Java映像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM