From d2dc582b1cd635d49d87602ffafcbaea44c96c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Vav=C5=99=C3=ADk?= <43821672+michalvavrik@users.noreply.github.com> Date: Fri, 27 Feb 2026 15:21:08 +0100 Subject: [PATCH] Increase allowed additions to legacy testsuite to 100 lines (#46635) (#46563) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: stianst Signed-off-by: Michal Vavřík --- docs/guides/server/containers.adoc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/guides/server/containers.adoc b/docs/guides/server/containers.adoc index 2781a4562e8..8fd2d1a4b78 100644 --- a/docs/guides/server/containers.adoc +++ b/docs/guides/server/containers.adoc @@ -136,6 +136,29 @@ This approach uses a chroot, `+/mnt/rootfs+`, so that only the packages you spec WARNING: Some packages have a large tree of dependencies. By installing new RPMs you may unintentionally increase the container's attack surface. Check the list of installed packages carefully. +=== Using an older OpenJDK version + +The {project_name} container image uses OpenJDK {jdk_version_recommended} by default, which is the recommended and tested version. +If a custom extension does not support OpenJDK {jdk_version_recommended}, you can use an older supported OpenJDK version by installing the appropriate OpenJDK RPM and updating the `PATH` and `JAVA_HOME` environment variables. + +Use the two-stage pattern from the previous section to install the OpenJDK RPM. +The following example shows how to use OpenJDK 21: + +[source, dockerfile] +---- +FROM registry.access.redhat.com/ubi9 AS ubi-micro-build +RUN mkdir -p /mnt/rootfs +RUN dnf install --installroot /mnt/rootfs java-21-openjdk-headless --releasever 9 --setopt install_weak_deps=false --nodocs -y && \ + dnf --installroot /mnt/rootfs clean all && \ + rpm --root /mnt/rootfs -e --nodeps setup + +FROM quay.io/keycloak/keycloak +COPY --from=ubi-micro-build /mnt/rootfs / + +ENV PATH=/usr/lib/jvm/jre-21/bin:$PATH +ENV JAVA_HOME=/usr/lib/jvm/jre-21 +---- + === Custom ENTRYPOINT shell scripts If you use a custom entry point script, start {project_name} with `exec` so it can receive termination signals that are essential for a graceful shutdown.