什么是Docker映像参考

什么是Docker映像参考

本文介绍了什么是Docker映像参考?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Docker 在很多地方都提到了图像参考。但是,运行 docker images 命令将提供具有以下属性的图像列表:REPOSITORY,TAG,IMAGE ID,CREATED,SIZE-无参考。

Docker documentation mentions image reference in many places. However, running docker images command gives the list of images with the following properties: REPOSITORY, TAG, IMAGE ID, CREATED, SIZE - no reference. Is 'reference' a synonym for ID or digest, or something else?

推荐答案

docker图像参考是REPOSITORY的组合和TAG,格式为 REPOSITORY:TAG ,两者均以分隔。因此,如果您的图片的存储库为 IMAGE1 并且标签为 latest ,则图像引用为 IMAGE1:latest 。映像参考的知识将帮助您通过运行以下命令按引用过滤docker映像列表:

The docker image reference is the combination of the REPOSITORY and TAG in this format REPOSITORY:TAG where they are both separated by :. So if you have an image with a REPOSITORY of IMAGE1 and a tag of latest the image reference would be IMAGE1:latest. The knowledge of an image reference would help you to filter by docker image list by reference by running:

docker images --filter=reference='myDocker*:*dev'

以上命令将返回所有存储库名称以 myDocker 开头且标签名称以 dev 结尾的docker镜像。

The above command will return all docker images that the repository name starts with myDocker and the tag name ends with dev.

这篇关于什么是Docker映像参考?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 01:57