This is an automated email from the ASF dual-hosted git repository.
xiangfu0 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 520655bd0a8 Require patched OpenJDK in Pinot container builds (#20304)
520655bd0a8 is described below
commit 520655bd0a82e7ded1ee0a5107c6f267e07d3470
Author: Xiang Fu <[email protected]>
AuthorDate: Wed Nov 18 15:29:14 2026 -0800
Require patched OpenJDK in Pinot container builds (#20304)
The published base images still carry Java builds affected by the November
2026 advisory.
Refresh the bases on rebuild and reject older Java 21 and 25 versions
before publishing.
---
.../workflows/build-pinot-base-docker-image.yml | 4 +--
.../.pinot_base_docker_image_build_and_push.sh | 18 ++++++++----
.../docker/.pinot_compile_and_push_build_image.sh | 1 +
.../docker/.pinot_docker_image_build_and_push.sh | 1 +
.../docker/.pinot_package_single_platform.sh | 1 +
docker/images/pinot-base/README.md | 22 +++++++++------
.../pinot-base-build/amazoncorretto.dockerfile | 4 +--
.../pinot-base-build/ms-openjdk.dockerfile | 2 +-
.../pinot-base-runtime/amazoncorretto.dockerfile | 4 +--
.../pinot-base-runtime/ms-openjdk.dockerfile | 2 +-
docker/images/pinot/Dockerfile | 6 ++++
docker/images/pinot/Dockerfile.build | 3 ++
docker/images/pinot/Dockerfile.package | 3 ++
docker/images/pinot/README.md | 6 ++--
docker/images/pinot/check-java-version.sh | 32 ++++++++++++++++++++++
docker/images/pinot/docker-build-and-push.sh | 6 ++--
docker/images/pinot/docker-build.sh | 4 +--
17 files changed, 89 insertions(+), 30 deletions(-)
diff --git a/.github/workflows/build-pinot-base-docker-image.yml
b/.github/workflows/build-pinot-base-docker-image.yml
index e4458bd39e1..46d2c356b40 100644
--- a/.github/workflows/build-pinot-base-docker-image.yml
+++ b/.github/workflows/build-pinot-base-docker-image.yml
@@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
openJdkDist: ["amazoncorretto", "ms-openjdk"]
- jdk_version: [21, 25]
+ jdk_version: [25]
arch: [amd64, arm64]
type: [build, runtime]
include:
@@ -60,7 +60,7 @@ jobs:
strategy:
matrix:
openJdkDist: ["amazoncorretto", "ms-openjdk"]
- jdk_version: [21, 25]
+ jdk_version: [25]
type: [build, runtime]
steps:
- name: Login to DockerHub
diff --git
a/.github/workflows/scripts/docker/.pinot_base_docker_image_build_and_push.sh
b/.github/workflows/scripts/docker/.pinot_base_docker_image_build_and_push.sh
index e3a6a4be92c..96f87b34db8 100755
---
a/.github/workflows/scripts/docker/.pinot_base_docker_image_build_and_push.sh
+++
b/.github/workflows/scripts/docker/.pinot_base_docker_image_build_and_push.sh
@@ -28,15 +28,21 @@ if [ -z "${BASE_IMAGE_TYPE}" ]; then
exit 1
fi
-cd docker/images/pinot-base/pinot-base-${BASE_IMAGE_TYPE}
+BASE_IMAGE_DIR="docker/images/pinot-base/pinot-base-${BASE_IMAGE_TYPE}"
+JAVA_VERSION="${JDK_VERSION:-25}"
+IMAGE="apachepinot/pinot-base-${BASE_IMAGE_TYPE}:${TAG}-${ARCH}"
docker build \
+ --pull \
--no-cache \
--platform=${BUILD_PLATFORM} \
- --file ${OPEN_JDK_DIST}.dockerfile \
- --tag apachepinot/pinot-base-${BASE_IMAGE_TYPE}:${TAG}-${ARCH} \
- --build-arg JAVA_VERSION=${JDK_VERSION:-21} \
+ --file "${BASE_IMAGE_DIR}/${OPEN_JDK_DIST}.dockerfile" \
+ --tag "${IMAGE}" \
+ --build-arg JAVA_VERSION="${JAVA_VERSION}" \
--build-arg ARCH=${ARCH} \
- .
+ "${BASE_IMAGE_DIR}"
-docker push apachepinot/pinot-base-${BASE_IMAGE_TYPE}:${TAG}-${ARCH}
+docker run --rm -i --platform "${BUILD_PLATFORM}" --entrypoint sh "${IMAGE}"
-s \
+ < docker/images/pinot/check-java-version.sh
+
+docker push "${IMAGE}"
diff --git
a/.github/workflows/scripts/docker/.pinot_compile_and_push_build_image.sh
b/.github/workflows/scripts/docker/.pinot_compile_and_push_build_image.sh
index 0e063f6916a..10da9480061 100755
--- a/.github/workflows/scripts/docker/.pinot_compile_and_push_build_image.sh
+++ b/.github/workflows/scripts/docker/.pinot_compile_and_push_build_image.sh
@@ -55,6 +55,7 @@ COMPILE_BASE_IMAGE_TAG="${JDK_VERSION}-amazoncorretto"
echo "Building docker image for platform: amd64 with tag:
pinot-build:${PINOT_BUILD_IMAGE_TAG}"
docker build \
+ --pull \
--no-cache \
--platform linux/amd64 \
--file Dockerfile.build \
diff --git
a/.github/workflows/scripts/docker/.pinot_docker_image_build_and_push.sh
b/.github/workflows/scripts/docker/.pinot_docker_image_build_and_push.sh
index 1868d87468e..0dc2da308b2 100755
--- a/.github/workflows/scripts/docker/.pinot_docker_image_build_and_push.sh
+++ b/.github/workflows/scripts/docker/.pinot_docker_image_build_and_push.sh
@@ -67,6 +67,7 @@ cd ${DOCKER_FILE_BASE_DIR}
echo "Building Pinot Docker image with JDK ${JDK_VERSION} and base image tag
${PINOT_BASE_IMAGE_TAG}"
docker buildx build \
+ --pull \
--no-cache \
--platform=${BUILD_PLATFORM} \
--file Dockerfile \
diff --git a/.github/workflows/scripts/docker/.pinot_package_single_platform.sh
b/.github/workflows/scripts/docker/.pinot_package_single_platform.sh
index 30e6f07180e..91a5819277d 100755
--- a/.github/workflows/scripts/docker/.pinot_package_single_platform.sh
+++ b/.github/workflows/scripts/docker/.pinot_package_single_platform.sh
@@ -71,6 +71,7 @@ for runtimeImage in "${runtimeImages[@]}"; do
fi
done
+ docker pull --platform "linux/${BUILD_ARCH}"
"apachepinot/pinot-base-runtime:${runtimeImage}"
echo "Building docker image for platform: ${BUILD_ARCH} with tags:
${DOCKER_BUILD_TAGS}"
docker build \
--no-cache \
diff --git a/docker/images/pinot-base/README.md
b/docker/images/pinot-base/README.md
index eb0acdc24c8..ea494018703 100644
--- a/docker/images/pinot-base/README.md
+++ b/docker/images/pinot-base/README.md
@@ -25,30 +25,34 @@ This is the base docker image to build [Apache
Pinot](https://github.com/apache/
## Build and publish the docker image
-Here is
-the [Github Action
task](https://github.com/apachepinot/pinot-fork/actions/workflows/build-pinot-docker-base-image.yml)
-to build and publish pinot base docker images.
+Use the [Pinot Base Docker Image Build and Publish
workflow](https://github.com/apache/pinot/actions/workflows/build-pinot-base-docker-image.yml)
+to build and publish base images for amd64 and arm64.
-This task can be triggered manually to build the cross platform(amd64 and
arm64v8) base image.
+To roll out a JDK security update, publish the build and runtime base images,
+then rebuild and publish the Pinot application images that use them. The Pinot
+image builds check the JDK in their base images before compiling or packaging.
For the
+[November 2026 OpenJDK
advisory](https://openjdk.org/groups/vulnerability/advisories/2026-11-17),
+the base image workflow verifies OpenJDK 25.0.5.1 or newer within the Java 25
release line.
-The build shell is:
+Use the workflow for official base image publishing. The following commands are
+for manual builds:
For Amazon Corretto 25:
```SHELL
-docker buildx build --no-cache --platform=linux/arm64,linux/amd64 --file
pinot-base-build/amazoncorretto.dockerfile --tag
apachepinot/pinot-base-build:25-amazoncorretto --push .
+docker buildx build --pull --no-cache --build-arg JAVA_VERSION=25
--platform=linux/arm64,linux/amd64 --file
pinot-base-build/amazoncorretto.dockerfile --tag
apachepinot/pinot-base-build:25-amazoncorretto --push .
```
```SHELL
-docker buildx build --no-cache --platform=linux/arm64,linux/amd64 --file
pinot-base-runtime/amazoncorretto.dockerfile --tag
apachepinot/pinot-base-runtime:25-amazoncorretto --push .
+docker buildx build --pull --no-cache --build-arg JAVA_VERSION=25
--platform=linux/arm64,linux/amd64 --file
pinot-base-runtime/amazoncorretto.dockerfile --tag
apachepinot/pinot-base-runtime:25-amazoncorretto --push .
```
For MS OpenJDK, the build shell is:
```SHELL
-docker buildx build --no-cache --platform=linux/arm64,linux/amd64 --file
pinot-base-build/ms-openjdk.dockerfile --tag
apachepinot/pinot-base-build:25-ms-openjdk --push .
+docker buildx build --pull --no-cache --build-arg JAVA_VERSION=25
--platform=linux/arm64,linux/amd64 --file
pinot-base-build/ms-openjdk.dockerfile --tag
apachepinot/pinot-base-build:25-ms-openjdk --push .
```
```SHELL
-docker buildx build --no-cache --platform=linux/arm64,linux/amd64 --file
pinot-base-runtime/ms-openjdk.dockerfile --tag
apachepinot/pinot-base-runtime:25-ms-openjdk --push .
+docker buildx build --pull --no-cache --build-arg JAVA_VERSION=25
--platform=linux/arm64,linux/amd64 --file
pinot-base-runtime/ms-openjdk.dockerfile --tag
apachepinot/pinot-base-runtime:25-ms-openjdk --push .
```
diff --git
a/docker/images/pinot-base/pinot-base-build/amazoncorretto.dockerfile
b/docker/images/pinot-base/pinot-base-build/amazoncorretto.dockerfile
index 409d49cabfb..e4f62660090 100644
--- a/docker/images/pinot-base/pinot-base-build/amazoncorretto.dockerfile
+++ b/docker/images/pinot-base/pinot-base-build/amazoncorretto.dockerfile
@@ -16,7 +16,7 @@
# specific language governing permissions and limitations
# under the License.
#
-ARG JAVA_VERSION=21
+ARG JAVA_VERSION=25
FROM debian:bookworm-slim
LABEL [email protected]
@@ -45,7 +45,7 @@ RUN set -eux \
# Install Amazon Corretto.
# /etc/apt/keyrings/ is the correct path for user-managed keys referenced via
# signed-by=; apt natively handles ASCII-armored .asc files at that path.
-ARG JAVA_VERSION=21
+ARG JAVA_VERSION=25
RUN set -eux \
&& mkdir -p /etc/apt/keyrings \
&& wget -qO /etc/apt/keyrings/corretto.asc
https://apt.corretto.aws/corretto.key \
diff --git a/docker/images/pinot-base/pinot-base-build/ms-openjdk.dockerfile
b/docker/images/pinot-base/pinot-base-build/ms-openjdk.dockerfile
index 967c9c3062e..2451f1d7a43 100644
--- a/docker/images/pinot-base/pinot-base-build/ms-openjdk.dockerfile
+++ b/docker/images/pinot-base/pinot-base-build/ms-openjdk.dockerfile
@@ -16,7 +16,7 @@
# specific language governing permissions and limitations
# under the License.
#
-ARG JAVA_VERSION=21
+ARG JAVA_VERSION=25
ARG JDK_IMAGE=mcr.microsoft.com/openjdk/jdk
FROM ${JDK_IMAGE}:${JAVA_VERSION}-ubuntu AS pinot_build_env
diff --git
a/docker/images/pinot-base/pinot-base-runtime/amazoncorretto.dockerfile
b/docker/images/pinot-base/pinot-base-runtime/amazoncorretto.dockerfile
index 2092f5f47f2..f66a244dc1f 100644
--- a/docker/images/pinot-base/pinot-base-runtime/amazoncorretto.dockerfile
+++ b/docker/images/pinot-base/pinot-base-runtime/amazoncorretto.dockerfile
@@ -20,7 +20,7 @@
# AL2023 image to avoid system packages (python3, etc.) that are not needed
# at runtime and consistently accumulate CVEs. wget is used instead of curl
# to avoid pulling in libcurl's LDAP/HTTP2 dependencies.
-ARG JAVA_VERSION=21
+ARG JAVA_VERSION=25
FROM debian:bookworm-slim
LABEL [email protected]
@@ -41,7 +41,7 @@ RUN set -eux \
# Install Amazon Corretto JDK.
# /etc/apt/keyrings/ is the correct path for user-managed keys referenced via
# signed-by=; apt natively handles ASCII-armored .asc files at that path.
-ARG JAVA_VERSION=21
+ARG JAVA_VERSION=25
RUN set -eux \
&& mkdir -p /etc/apt/keyrings \
&& wget -qO /etc/apt/keyrings/corretto.asc
https://apt.corretto.aws/corretto.key \
diff --git a/docker/images/pinot-base/pinot-base-runtime/ms-openjdk.dockerfile
b/docker/images/pinot-base/pinot-base-runtime/ms-openjdk.dockerfile
index 0bce7b47db3..5cd691c5faa 100644
--- a/docker/images/pinot-base/pinot-base-runtime/ms-openjdk.dockerfile
+++ b/docker/images/pinot-base/pinot-base-runtime/ms-openjdk.dockerfile
@@ -17,7 +17,7 @@
# under the License.
#
-ARG JAVA_VERSION=21
+ARG JAVA_VERSION=25
ARG JDK_IMAGE=mcr.microsoft.com/openjdk/jdk
FROM ${JDK_IMAGE}:${JAVA_VERSION}-ubuntu AS builder
diff --git a/docker/images/pinot/Dockerfile b/docker/images/pinot/Dockerfile
index d880f262542..637ba13dada 100644
--- a/docker/images/pinot/Dockerfile
+++ b/docker/images/pinot/Dockerfile
@@ -25,6 +25,9 @@ ARG PINOT_GIT_REF=master
ARG JDK_VERSION=25
ARG CI=true
+RUN
--mount=type=bind,source=check-java-version.sh,target=/tmp/check-java-version.sh
\
+ sh /tmp/check-java-version.sh
+
RUN echo "Build Pinot based on image:
apachepinot/pinot-base-build:${PINOT_BASE_IMAGE_TAG}"
RUN echo "Current build system CPU arch is [ $(uname -m) ]"
@@ -48,6 +51,9 @@ FROM apachepinot/pinot-base-runtime:${PINOT_BASE_IMAGE_TAG}
LABEL [email protected]
+RUN
--mount=type=bind,source=check-java-version.sh,target=/tmp/check-java-version.sh
\
+ sh /tmp/check-java-version.sh
+
ENV PINOT_HOME=/opt/pinot
ENV JAVA_OPTS="-Xms4G -Xmx4G -Dpinot.admin.system.exit=true"
ENV JDK_JAVA_OPTIONS="--add-modules=jdk.incubator.vector"
diff --git a/docker/images/pinot/Dockerfile.build
b/docker/images/pinot/Dockerfile.build
index 9408686c007..8ec536ff1bb 100644
--- a/docker/images/pinot/Dockerfile.build
+++ b/docker/images/pinot/Dockerfile.build
@@ -25,6 +25,9 @@ ARG PINOT_GIT_REF=master
ARG JDK_VERSION=25
ARG CI=true
+RUN
--mount=type=bind,source=check-java-version.sh,target=/tmp/check-java-version.sh
\
+ sh /tmp/check-java-version.sh
+
RUN echo "Build Pinot based on image:
apachepinot/pinot-base-build:${PINOT_BASE_IMAGE_TAG}"
RUN echo "Current build system CPU arch is [ $(uname -m) ]"
diff --git a/docker/images/pinot/Dockerfile.package
b/docker/images/pinot/Dockerfile.package
index 411afca2910..cc8fb97113f 100644
--- a/docker/images/pinot/Dockerfile.package
+++ b/docker/images/pinot/Dockerfile.package
@@ -22,6 +22,9 @@ FROM --platform=linux/amd64
pinot-build:${PINOT_BUILD_IMAGE_TAG} AS pinot_build_
FROM apachepinot/pinot-base-runtime:${PINOT_RUNTIME_IMAGE_TAG}
LABEL [email protected]
+RUN
--mount=type=bind,source=check-java-version.sh,target=/tmp/check-java-version.sh
\
+ sh /tmp/check-java-version.sh
+
ENV PINOT_HOME=/opt/pinot
ENV JAVA_OPTS="-Xms4G -Xmx4G -Dpinot.admin.system.exit=true"
ENV JDK_JAVA_OPTIONS="--add-modules=jdk.incubator.vector"
diff --git a/docker/images/pinot/README.md b/docker/images/pinot/README.md
index 7f4260bd296..72881809bfd 100644
--- a/docker/images/pinot/README.md
+++ b/docker/images/pinot/README.md
@@ -41,7 +41,7 @@ The docker image is tagged as `[Docker Tag]`.
`Kafka Version`: The Kafka version to build Pinot with. Default is `3.0`.
-`Java Version`: The Java build and runtime image version. Default is `21`.
+`Java Version`: The Java build and runtime image version. The current
Dockerfiles require Java 25.
* Example of building and tagging a snapshot:
```SHELL
@@ -59,13 +59,13 @@ On Apple Silicon (M1/M2) or any arm64 host, pass
`--platform linux/arm64`:
```SHELL
docker build -t pinot:latest --platform linux/arm64 --no-cache --network=host \
- --build-arg PINOT_GIT_REF=master --build-arg JDK_VERSION=21 -f Dockerfile .
+ --build-arg PINOT_GIT_REF=master --build-arg JDK_VERSION=25 -f Dockerfile .
```
On an x86 machine with QEMU installed, add `--platform linux/arm64` the same
way:
```SHELL
docker build -t pinot:latest --platform linux/arm64 --no-cache \
- --build-arg PINOT_GIT_REF=master --build-arg JDK_VERSION=21 -f Dockerfile .
+ --build-arg PINOT_GIT_REF=master --build-arg JDK_VERSION=25 -f Dockerfile .
```
## How to publish a docker image
diff --git a/docker/images/pinot/check-java-version.sh
b/docker/images/pinot/check-java-version.sh
new file mode 100644
index 00000000000..e349e0e8d2d
--- /dev/null
+++ b/docker/images/pinot/check-java-version.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -eu
+
+java_settings=$("${JAVA_HOME}/bin/java" -XshowSettings:properties -version
2>&1)
+java_version=$(printf '%s\n' "$java_settings" | awk '$1 == "java.version"
{print $3; exit}')
+# Minimum Java 25 build for the November 2026 OpenJDK security update.
+minimum_version=25.0.5.1
+if ! printf '%s\n' "$java_version" | grep -Eq '^25(\.[0-9]+)*$' ||
+ ! dpkg --compare-versions "$java_version" ge "$minimum_version"; then
+ printf 'Expected Java 25 at version %s or newer, found %s. Rebuild the Pinot
base image.\n' \
+ "$minimum_version" "${java_version:-unknown}" >&2
+ exit 1
+fi
+printf 'Using Java %s\n' "$java_version"
diff --git a/docker/images/pinot/docker-build-and-push.sh
b/docker/images/pinot/docker-build-and-push.sh
index c95f2de9a24..1ed5f2642a4 100755
--- a/docker/images/pinot/docker-build-and-push.sh
+++ b/docker/images/pinot/docker-build-and-push.sh
@@ -19,7 +19,9 @@
#
-sh docker-build.sh $@
+set -e
+
+./docker-build.sh "$@"
if [[ "$#" -gt 0 ]]
then
DOCKER_TAG=$1
@@ -27,4 +29,4 @@ else
DOCKER_TAG="pinot:latest"
fi
echo "Trying to push docker image to ${DOCKER_TAG}"
-docker push ${DOCKER_TAG}
+docker push "${DOCKER_TAG}"
diff --git a/docker/images/pinot/docker-build.sh
b/docker/images/pinot/docker-build.sh
index 889cd683820..3e7d92cf331 100755
--- a/docker/images/pinot/docker-build.sh
+++ b/docker/images/pinot/docker-build.sh
@@ -46,12 +46,12 @@ if [[ "$#" -gt 3 ]]
then
JAVA_VERSION=$4
else
- JAVA_VERSION=21
+ JAVA_VERSION=25
fi
echo "Trying to build Pinot docker image on git ref: [ ${PINOT_GIT_REF} ] and
tag it as: [ ${DOCKER_TAG} ]. Kafka Dependencies: [ ${KAFKA_VERSION} ]. Java
Version: [ ${JAVA_VERSION} ]."
-docker build --no-cache -t ${DOCKER_TAG} \
+docker build --pull --no-cache -t ${DOCKER_TAG} \
--build-arg PINOT_GIT_REF=${PINOT_GIT_REF} \
--build-arg KAFKA_VERSION=${KAFKA_VERSION} \
--build-arg JDK_VERSION=${JAVA_VERSION} \
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]