diff --git a/docker/builder/Dockerfile b/docker/builder/Dockerfile index 4c1ccce631795..fa8372707412f 100644 --- a/docker/builder/Dockerfile +++ b/docker/builder/Dockerfile @@ -1,8 +1,34 @@ FROM ubuntu:noble -# Install required packages -RUN apt-get update -y && \ - apt-get upgrade -y && \ - apt-get install curl gnupg2 -y && \ - apt-get clean -y +# Set environment variables for non-interactive installation +ENV DEBIAN_FRONTEND=noninteractive +# Update the package list and install necessary tools +RUN apt-get update \ + && apt-get upgrade -y \ + && apt-get install -y \ + wget \ + curl \ + unzip \ + gnupg2 + +# Install OpenJDK 21 +RUN wget -O- https://download.java.net/openjdk/jdk21/ri/openjdk-21+35_linux-x64_bin.tar.gz | tar xz -C /opt/ + +# Set JAVA_HOME environment variable +ENV JAVA_HOME=/opt/jdk-21 +ENV PATH=$JAVA_HOME/bin:$PATH + +# Install Gradle 8.10 +ENV GRADLE_VERSION=8.10 + +RUN wget https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip -P /tmp \ + && unzip -d /opt/gradle /tmp/gradle-${GRADLE_VERSION}-bin.zip \ + && rm /tmp/gradle-${GRADLE_VERSION}-bin.zip + +# Set GRADLE_HOME environment variable +ENV GRADLE_HOME=/opt/gradle/gradle-${GRADLE_VERSION} +ENV PATH=$GRADLE_HOME/bin:$PATH + +# Clean up APT when done +RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*