Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/keycloak-21.1.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

# Stage 1: Get the official Keycloak image
FROM quay.io/keycloak/keycloak:21.1.2@sha256:3408c186dde4a95c2b99ef1290721bf1d253d64ba3a1de0a46c667b8288051f0 AS source
FROM quay.io/keycloak/keycloak:26.8.2-3@sha256:7e66a96e4739239070aeaf72e4c5decf0f7f682cfc725b9f7ea2b336eaba38b3 AS source

# Stage 2: Create a patched base image using UBI 9 Minimal (pinned to a stable version)
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4@sha256:c0e70387664f30cd9cf2795b547e4a9a51002c44a4a86aa9335ab030134bf392 AS patched_base
USER root

Check warning on line 7 in scripts/keycloak-21.1.2/Dockerfile

View workflow job for this annotation

GitHub Actions / Dockerfile lint

Last USER should not be root
# Fix OS vulnerabilities (glibc, java, etc.) and install Java 17
RUN microdnf update -y && \

Check warning on line 9 in scripts/keycloak-21.1.2/Dockerfile

View workflow job for this annotation

GitHub Actions / Dockerfile lint

Specify version with `dnf install -y <package>-<version>`.
microdnf install -y shadow-utils java-17-openjdk-headless && \
groupadd -g 1000 keycloak && \
useradd -u 1000 -g keycloak -m -d /opt/keycloak -s /sbin/nologin keycloak && \
Expand All @@ -14,7 +14,7 @@
microdnf clean all

ARG MIN_JAVA_VERSION=17.0.21.1
RUN JAVA_VERSION_FOUND=$(java -XshowSettings:properties -version 2>&1 | sed -n 's/^ *java.version = //p') && \

Check warning on line 17 in scripts/keycloak-21.1.2/Dockerfile

View workflow job for this annotation

GitHub Actions / Dockerfile lint

Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
printf '%s\n%s\n' "$MIN_JAVA_VERSION" "$JAVA_VERSION_FOUND" | sort -V -C || \
{ echo "Java $JAVA_VERSION_FOUND is older than $MIN_JAVA_VERSION (CVE-2026-114938)"; exit 1; }

Expand Down
Loading