I have an OpenShift origin (OKD) cluster setup on AWS. Jenkins being used for CICD pipeline deployment. Based in OpenShift docs, I am trying to use Source to Image (S2I) to convert my Java source code to image using redhat-openjdk-18/openjdk18-openshift image. I used following commands
Create new build
$ 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
Start Build
$ 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
As shown above, I get build error: unable to get registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift error while running the start-build command.
oc new-app -Lit will tell you what you have installed. You possibly havejavaandwildflyimages. I don't know enough about Java to know which of these you might want to use. If you find those in the service catalog of the web console the descriptions should tell you what they are for. - Graham Dumpleton