ShreyeshArangath commented on code in PR #2025:
URL: https://github.com/apache/auron/pull/2025#discussion_r2851047645


##########
dev/docker-build/azurelinux3/Dockerfile:
##########
@@ -62,22 +62,51 @@ RUN curl https://sh.rustup.rs -sSf -o rustup-init && \
 ENV PATH="/root/.cargo/bin:${PATH}"
 
 # ---------------------------------------------------------------------
-# Install Java (Microsoft OpenJDK 17 - matches Azure Synapse Spark pools)
-# ---------------------------------------------------------------------
-RUN tdnf -y install msopenjdk-17 && \
-    tdnf clean all && \
-    rm -rf /var/cache/tdnf
-
-# Set JAVA_HOME for Microsoft OpenJDK 17 on Azure Linux
-ENV JAVA_HOME="/usr/lib/jvm/msopenjdk-17"
+# Install Java (multiple Temurin OpenJDK versions)
+# NOTE: JDK 8 and JDK 11 are EOL. Prefer JDK 17+ for new usage.
+# ---------------------------------------------------------------------
+ARG JDK_VERSIONS="8 11 17 21"
+ARG DEFAULT_JDK="8"
+ENV JAVA_INSTALL_BASE="/opt/java"
+RUN set -eux; \
+    mkdir -p "${JAVA_INSTALL_BASE}"; \
+    for v in ${JDK_VERSIONS}; do \
+      
url="https://github.com/adoptium/temurin${v}-binaries/releases/latest/download/OpenJDK${v}U-jdk_x64_linux_hotspot.tar.gz";;
 \
+      curl -fsSL "$url" -o /tmp/temurin.tar.gz || { echo "Failed to download 
JDK ${v}"; exit 1; }; \
+      mkdir -p "${JAVA_INSTALL_BASE}/temurin-${v}"; \
+      tar -xzf /tmp/temurin.tar.gz -C "${JAVA_INSTALL_BASE}/temurin-${v}" 
--strip-components=1; \
+    done; \
+    rm -f /tmp/temurin.tar.gz; \
+    alt="$(command -v update-alternatives || command -v alternatives)"; \
+    for v in ${JDK_VERSIONS}; do \
+      "$alt" --install /usr/bin/java java 
"${JAVA_INSTALL_BASE}/temurin-${v}/bin/java" $((100 + v)); \
+      "$alt" --install /usr/bin/javac javac 
"${JAVA_INSTALL_BASE}/temurin-${v}/bin/javac" $((100 + v)); \
+    done; \
+    "$alt" --set java "${JAVA_INSTALL_BASE}/temurin-${DEFAULT_JDK}/bin/java"; \
+    "$alt" --set javac "${JAVA_INSTALL_BASE}/temurin-${DEFAULT_JDK}/bin/javac"

Review Comment:
   This patterns seems like it would bloat the base image quite a bit. Why not, 
either
   1. let the callers pass in a build arg like so
   2. or have different docker files per jdk version (seems like common 
practice) 



##########
dev/docker-build/debian11/Dockerfile:
##########
@@ -58,14 +58,52 @@ RUN curl https://sh.rustup.rs -sSf -o rustup-init && \
 ENV PATH="/root/.cargo/bin:${PATH}"
 
 # ---------------------------------------------------------------------
-# Install Java (OpenJDK 11)
-# ---------------------------------------------------------------------
-RUN apt-get update -y && \
-    apt-get install -y --no-install-recommends openjdk-11-jdk && \
-    rm -rf /var/lib/apt/lists/*
-ENV JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
+# Install Java (multiple Temurin OpenJDK versions)
+# NOTE: JDK 8 and JDK 11 are EOL. Prefer JDK 17+ for new usage.
+# ---------------------------------------------------------------------
+ARG JDK_VERSIONS="8 11 17 21"
+ARG DEFAULT_JDK="8"

Review Comment:
   Any reason why the default is still JDK 8? 



##########
dev/docker-build/azurelinux3/Dockerfile:
##########
@@ -62,22 +62,51 @@ RUN curl https://sh.rustup.rs -sSf -o rustup-init && \
 ENV PATH="/root/.cargo/bin:${PATH}"
 
 # ---------------------------------------------------------------------
-# Install Java (Microsoft OpenJDK 17 - matches Azure Synapse Spark pools)

Review Comment:
   We would still want to install Microsoft OpenJDK based java versions for 
azurelinux, right? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to