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.第 10 章 在构建中使用红帽订阅
按照以下小节中的内容在 OpenShift Container Platform 上运行授权构建。
10.1. 创建 Red Hat Universal Base Image 的 ImageStreamTag 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
要在构建中使用红帽订阅,您需要创建一个 ImageStream
来引用通用基础镜像 (UBI) 。
直接从 registry.redhat.io 引用 UBI 的构建需要一个 pull secret。
先决条件
- 您必须为 registry.redhat.io 创建一个 pull secret,并将其链接到用户项目。
流程
在单个项目中创建
imagestreamtag
:oc tag --source=docker registry.redhat.io/ubi7/ubi:latest ubi:latest
$ oc tag --source=docker registry.redhat.io/ubi7/ubi:latest ubi:latest
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在 OpenShift Container Platform 命名空间中创建
imagestreamtag
供所有项目中的开发人员使用:oc tag --source=docker registry.redhat.io/ubi7/ubi:latest ubi:latest -n openshift
$ oc tag --source=docker registry.redhat.io/ubi7/ubi:latest ubi:latest -n openshift
Copy to Clipboard Copied! Toggle word wrap Toggle overflow