mirror of
https://github.com/keycloak/keycloak.git
synced 2026-05-28 04:13:22 -04:00
Signed-off-by: stianst <stianst@gmail.com> Signed-off-by: Michal Vavřík <michal.vavrik@aol.com>
This commit is contained in:
parent
9c6cf57410
commit
d2dc582b1c
1 changed files with 23 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue