From 90c0fe9b87eed97be49338a17cc7faf545d4a560 Mon Sep 17 00:00:00 2001 From: Juanpe Araque Date: Tue, 4 Nov 2025 14:24:43 +0000 Subject: [PATCH] Replace openjdk images with amazoncorretto docker images (#21821) * Replace openjdk images with amazoncorretto docker images * Use al2 version fro jdk19 that does not use alpine * Update sbt version to fix __xstat64 missing issue * Fix logs validation in docker compose launch * Add curl to the Dockerfile to ensure we can still build the test docker image if the wrapper jar file is removed (cherry picked from commit eac1ac74ff71d13876a0ed843e1c6bc906a19d3f) --- hudi/tests/conftest.py | 2 +- hudi/tests/docker/Dockerfile | 4 ++-- quarkus/tests/docker/micrometer-quickstart/Dockerfile | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hudi/tests/conftest.py b/hudi/tests/conftest.py index 3cb4c988b2626..3effb39a1227e 100644 --- a/hudi/tests/conftest.py +++ b/hudi/tests/conftest.py @@ -16,7 +16,7 @@ def dd_environment(): compose_file = os.path.join(HERE, 'docker', 'docker-compose.yaml') with docker_run( compose_file=compose_file, - conditions=[CheckDockerLogs('spark-app-hudi', 'finished: show at script.scala:163')], + conditions=[CheckDockerLogs('spark-app-hudi', 'finished: show at script.scala')], attempts=5, attempts_wait=5, ): diff --git a/hudi/tests/docker/Dockerfile b/hudi/tests/docker/Dockerfile index d17806c0473e9..b0a7702f60d55 100644 --- a/hudi/tests/docker/Dockerfile +++ b/hudi/tests/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:8-jdk-alpine +FROM amazoncorretto:8-alpine-jdk ARG SPARK_VERSION ARG HADOOP_VERSION @@ -12,7 +12,7 @@ RUN apk add --no-cache curl bash \ && rm spark-${SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz \ && cd / -RUN wget -O - https://github.com/sbt/sbt/releases/download/v1.4.1/sbt-1.4.1.tgz | gunzip | tar -x -C /usr/local +RUN wget -O - https://github.com/sbt/sbt/releases/download/v1.9.8/sbt-1.9.8.tgz | gunzip | tar -x -C /usr/local ENV PATH /usr/local/sbt/bin:${PATH} diff --git a/quarkus/tests/docker/micrometer-quickstart/Dockerfile b/quarkus/tests/docker/micrometer-quickstart/Dockerfile index 09f4137121700..ef3d140cdc9c0 100644 --- a/quarkus/tests/docker/micrometer-quickstart/Dockerfile +++ b/quarkus/tests/docker/micrometer-quickstart/Dockerfile @@ -1,5 +1,8 @@ # Use the official JDK 19 image as the base image for the build stage -FROM openjdk:19-jdk AS build +FROM amazoncorretto:19-al2-jdk AS build + +# Install curl for Maven wrapper downloads (fallback if maven-wrapper.jar is missing) +RUN yum install -y curl && yum clean all # Enable preview features ENV JAVA_OPTS="--enable-preview" @@ -33,7 +36,7 @@ RUN ./mvnw package -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -B -V # Use the official JDK 19 image as the base image for the runtime stage -FROM openjdk:19-jdk AS runtime +FROM amazoncorretto:19-al2-jdk AS runtime # Enable preview features ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager --enable-preview"