Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change image version to 9 and runtime #9

Merged
merged 1 commit into from
Jun 13, 2023
Merged

change image version to 9 and runtime #9

merged 1 commit into from
Jun 13, 2023

Conversation

hupling
Copy link
Collaborator

@hupling hupling commented May 26, 2023

Description

https://developers.redhat.com/articles/2021/05/24/build-lean-java-containers-new-red-hat-universal-base-images-openjdk-runtime#

Update das Image von ubi8 zu ubi9.

Wechsel zum Runtime, da das Image kleine ist, weil z.b. Maven fehlt. Die JAR Datei in der Pipeline gebaut wird und nicht in diesem Dockerimage.

Intern können wir auch mal zu dem Image umstellen.

Vor dem Merge sollte jemand das testen

@hupling
Copy link
Collaborator Author

hupling commented May 26, 2023

zur Info @eidottermihi @klml @ejcsid

@hupling
Copy link
Collaborator Author

hupling commented Jun 13, 2023

 eval oc start-build bc/$OPENSHIFT_BUILDCONFIG --from-file=$JAR_FILE --follow --wait
Uploading file "target/beispielprojekt-backend-0.0.1-SNAPSHOT.jar" as binary input for the build ...
.
Uploading finished
build.build.openshift.io/beispielprojekt-backend-dev-12 started
Adding cluster TLS certificate authority to trust store
Receiving source from STDIN as file beispielprojekt-backend-0.0.1-SNAPSHOT.jar
Adding cluster TLS certificate authority to trust store
Adding cluster TLS certificate authority to trust store
time="2023-06-13T07:01:58Z" level=info msg="Not using native diff for overlay, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled"
I0613 07:01:58.886188       1 defaults.go:102] Defaulting to storage driver "overlay" with options [mountopt=metacopy=on].
Caching blobs under "/var/cache/blobs".
Trying to pull registry.access.redhat.com/ubi9/openjdk-11-runtime:latest...
Getting image source signatures
Copying blob sha256:fefe8c7e29d62e0c8b41557ecc4055f90c54a1b298e87b69ba1888c97d99cb1d
Copying blob sha256:a9f076b473b10f92470b5c7fe238962e80f6eedd374d74105fcfad39afb4f699
Copying config sha256:bbbb2be83df9517bcc4ef597427573e54d1e3cf163b1512829e5b38b380feddc
Writing manifest to image destination
Storing signatures
Generating dockerfile with builder image registry.access.redhat.com/ubi9/openjdk-11-runtime:latest
Adding transient rw bind mount for /run/secrets/rhsm
STEP 1/9: FROM registry.access.redhat.com/ubi9/openjdk-11-runtime:latest
STEP 2/9: LABEL "io.openshift.build.image"="registry.access.redhat.com/ubi9/openjdk-11-runtime:latest"       "io.openshift.build.source-location"="/tmp/build/inputs"
STEP 3/9: ENV OPENSHIFT_BUILD_NAME="beispielprojekt-backend-dev-12"     OPENSHIFT_BUILD_NAMESPACE="xxx"
STEP 4/9: USER root
STEP 5/9: COPY upload/src /tmp/src
STEP 6/9: RUN chown -R 185:0 /tmp/src
STEP 7/9: USER 185
STEP 8/9: RUN /usr/libexec/s2i/assemble
/bin/sh: line 1: /usr/libexec/s2i/assemble: No such file or directory
error: build error: error building at STEP "RUN /usr/libexec/s2i/assemble": error while running runtime: exit status 127
error: the build km83/beispielprojekt-backend-dev-12 status is "Failed"

Leider funktioniert die Strategy Source nicht mehr mit dem Image. Man müsste dann mit Dockerfiles arbeiten. So wie hier.

Copy link
Member

@eidottermihi eidottermihi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leider funktioniert die Strategy Source nicht mehr mit dem Image. Man müsste dann mit Dockerfiles arbeiten. So wie hier.

das -runtime Image ist ja auch genau kein S2I Image - d.h. das was du gemacht hast, ist ja auch gar nicht vorgesehen.

Ich hab den Dockerfile Build mit ubi9/openjdk-17-runtime in https://github.com/it-at-m/ad2image eingebaut, das funktioniert.

Allerdings hat wohl das dort inkludierte run-java.sh Skript eine neuere Version mt einer Änderung, sodass man jetzt bei Ausführung des Images nicht mehr JAVA_OPTIONS angeben kann, sondern jetzt JAVA_OPTS_APPEND. Das ist aber Sache vom User.

@eidottermihi eidottermihi merged commit 3cfe840 into it-at-m:dev Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants