Red Hat Training
A Red Hat training course is available for OpenShift Container Platform
3.5.2.7.3. 为外部镜像添加标签
对所有标签相关的操作使用 oc tag 命令,如添加标签指向内部或外部镜像:
$ oc tag <repositiory/image> <image-name:tag>
例如,该命令可将 docker.io/python:3.6.0 镜像映射到 python 镜像流中的 3.6 标签。
$ oc tag docker.io/python:3.6.0 python:3.6
输出示例
Tag python:3.6 set to docker.io/python:3.6.0.
如果外部镜像安全,则需要创建带有用于访问该 registry 的凭证的 secret。如需了解更多详细信息,请参阅从私有 registry 中导入镜像。