This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.6.7.3. 为外部镜像添加标签
您可为外部镜像添加标签。
流程
通过使用
oc tag命令执行所有标签相关操作,添加指向内部或外部镜像的标签:oc tag <repository/image> <image-name:tag>
$ oc tag <repository/image> <image-name:tag>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 例如,该命令可将
docker.io/python:3.6.0镜像映射到python镜像流中的3.6标签。oc tag docker.io/python:3.6.0 python:3.6
$ oc tag docker.io/python:3.6.0 python:3.6Copy to Clipboard Copied! Toggle word wrap Toggle overflow 输出示例
Tag python:3.6 set to docker.io/python:3.6.0.
Tag python:3.6 set to docker.io/python:3.6.0.Copy to Clipboard Copied! Toggle word wrap Toggle overflow 如果外部镜像安全,则您必须创建带有凭证的 secret 以访问该 registry。