【问题标题】:Unable to get registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift image error in OpenShift deployment在 OpenShift 部署中无法获取 registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift 映像错误
【发布时间】:2019-03-26 21:53:35
【问题描述】:

我在 AWS 上设置了 OpenShift 源 (OKD) 集群。 Jenkins 被用于 CICD 管道部署。基于 OpenShift 文档,我正在尝试使用 Source to Image (S2I) 将我的 Java 源代码转换为使用 redhat-openjdk-18/openjdk18-openshift 图像的图像。我使用了以下命令

创建新版本

$ oc new-build --binary=true --name=bookstore --image-stream=openjdk18-openshift
--> Found image 24d98bd (7 days old) in image stream "cicd/openjdk18-openshift" under tag "latest" for "openjdk18-openshift"

    Java Applications
    -----------------
    Platform for building and running plain Java applications (fat-jar and flat classpath)

    Tags: builder, java

    * A source build using binary input will be created
      * The resulting image will be pushed to image stream "bookstore:latest"
      * A binary build was created, use 'start-build --from-dir' to trigger a new build

--> Creating resources with label build=bookstore ...
    imagestream "bookstore" created
    buildconf

开始构建

$ oc start-build bookstore --from-dir=./ocp --follow
Uploading directory "ocp" as binary input for the build ...
build "bookstore-1" started
Receiving source from STDIN as archive ...
pulling image error : open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory
error: build error: unable to get registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift@sha256:38dab2c3f60ade6857cc2a592184c964d3a51e2d3b5ef07def4b8ad4215d2bbf

如上所示,我在运行 start-build 命令时收到 build error: unable to get registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift 错误。

【问题讨论】:

  • Java 中间件产品的 Red Hat 映像仅在您使用 Red Hat 的 OpenShift Container Platform 产品时可用,而不是来自 OpenShift 的开源上游 OKD 变体。查看与 OKD 捆绑的“java”S2I 映像是否满足您的需求。
  • @GrahamDumpleton 在哪里可以找到 Java S2I okd 映像? OKD docs 显示相同的 redhat 图片
  • 如果你运行oc new-app -L,它会告诉你你安装了什么。你可能有javawildfly 图像。我对 Java 的了解还不够,不知道您可能想要使用其中的哪些。如果您在 Web 控制台的服务目录中找到它们,说明应该会告诉您它们的用途。

标签: java jenkins jenkins-pipeline openshift openshift-origin


【解决方案1】:

感谢格雷厄姆的意见。我能够通过在所有节点(主节点和工作节点)节点上创建空文件来解决这个问题

$ sudo vi /etc/rhsm/ca/redhat-uep.pem 

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多