Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle: Add GraalVM image #15196

Merged
merged 1 commit into from
Aug 15, 2023
Merged

Gradle: Add GraalVM image #15196

merged 1 commit into from
Aug 15, 2023

Conversation

keeganwitt
Copy link
Contributor

No description provided.

@keeganwitt keeganwitt changed the title Add GraalVM based images Add GraalVM image Aug 14, 2023
@github-actions
Copy link

Diff for 4247127:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index 41d732d..92dff8c 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -95,38 +95,43 @@ Directory: jdk17-focal
 
 Tags: 8.2.1-jdk8, 8.2-jdk8, 8-jdk8, jdk8, 8.2.1-jdk8-jammy, 8.2-jdk8-jammy, 8-jdk8-jammy, jdk8-jammy
 Architectures: amd64, arm32v7, arm64v8, ppc64le
-GitCommit: 2ba84220e311de7a55f3731509dd772a885b86f8
+GitCommit: e24445c1fe2bcf086d2370b10200266f6ce18865
 Directory: jdk8
 
 Tags: 8.2.1-jdk8-focal, 8.2-jdk8-focal, 8-jdk8-focal, jdk8-focal
 Architectures: amd64, arm32v7, arm64v8, ppc64le
-GitCommit: 2ba84220e311de7a55f3731509dd772a885b86f8
+GitCommit: e24445c1fe2bcf086d2370b10200266f6ce18865
 Directory: jdk8-focal
 
 Tags: 8.2.1-jdk11, 8.2-jdk11, 8-jdk11, jdk11, 8.2.1-jdk11-jammy, 8.2-jdk11-jammy, 8-jdk11-jammy, jdk11-jammy
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 2ba84220e311de7a55f3731509dd772a885b86f8
+GitCommit: e24445c1fe2bcf086d2370b10200266f6ce18865
 Directory: jdk11
 
 Tags: 8.2.1-jdk11-alpine, 8.2-jdk11-alpine, 8-jdk11-alpine, jdk11-alpine
-GitCommit: 2ba84220e311de7a55f3731509dd772a885b86f8
+GitCommit: e24445c1fe2bcf086d2370b10200266f6ce18865
 Directory: jdk11-alpine
 
 Tags: 8.2.1-jdk11-focal, 8.2-jdk11-focal, 8-jdk11-focal, jdk11-focal
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 2ba84220e311de7a55f3731509dd772a885b86f8
+GitCommit: e24445c1fe2bcf086d2370b10200266f6ce18865
 Directory: jdk11-focal
 
 Tags: 8.2.1-jdk17, 8.2-jdk17, 8-jdk17, jdk17, 8.2.1-jdk, 8.2-jdk, 8-jdk, jdk, 8.2.1, 8.2, 8, latest, 8.2.1-jdk17-jammy, 8.2-jdk17-jammy, 8-jdk17-jammy, jdk17-jammy, 8.2.1-jdk-jammy, 8.2-jdk-jammy, 8-jdk-jammy, jdk-jammy, 8.2.1-jammy, 8.2-jammy, 8-jammy, jammy
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 2ba84220e311de7a55f3731509dd772a885b86f8
+GitCommit: e24445c1fe2bcf086d2370b10200266f6ce18865
 Directory: jdk17
 
 Tags: 8.2.1-jdk17-alpine, 8.2-jdk17-alpine, 8-jdk17-alpine, jdk17-alpine, 8.2.1-jdk-alpine, 8.2-jdk-alpine, 8-jdk-alpine, jdk-alpine, 8.2.1-alpine, 8.2-alpine, 8-alpine, alpine
-GitCommit: 2ba84220e311de7a55f3731509dd772a885b86f8
+GitCommit: e24445c1fe2bcf086d2370b10200266f6ce18865
 Directory: jdk17-alpine
 
 Tags: 8.2.1-jdk17-focal, 8.2-jdk17-focal, 8-jdk17-focal, jdk17-focal, 8.2.1-jdk-focal, 8.2-jdk-focal, 8-jdk-focal, jdk-focal, 8.2.1-focal, 8.2-focal, 8-focal, focal
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 2ba84220e311de7a55f3731509dd772a885b86f8
+GitCommit: e24445c1fe2bcf086d2370b10200266f6ce18865
 Directory: jdk17-focal
+
+Tags: 8.2.1-jdk17-graal, 8.2-jdk17-graal, 8-jdk17-graal, jdk17-graal, 8.2.1-jdk-graal, 8.2-jdk-graal, 8-jdk-graal, jdk-graal, 8.2.1-graal, 8.2-graal, 8-graal, graal, 8.2.1-jdk17-graal-jammy, 8.2-jdk17-graal-jammy, 8-jdk17-graal-jammy, jdk17-graal-jammy, 8.2.1-jdk-graal-jammy, 8.2-jdk-graal-jammy, 8-jdk-graal-jammy, jdk-graal-jammy, 8.2.1-graal-jammy, 8.2-graal-jammy, 8-graal-jammy, graal-jammy
+Architectures: amd64, arm64v8
+GitCommit: e24445c1fe2bcf086d2370b10200266f6ce18865
+Directory: jdk17-graal
diff --git a/_bashbrew-list b/_bashbrew-list
index e055d10..47a9029 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -115,6 +115,8 @@ gradle:7.6.2-jdk-jammy
 gradle:8
 gradle:8-alpine
 gradle:8-focal
+gradle:8-graal
+gradle:8-graal-jammy
 gradle:8-jammy
 gradle:8-jdk
 gradle:8-jdk8
@@ -127,13 +129,19 @@ gradle:8-jdk11-jammy
 gradle:8-jdk17
 gradle:8-jdk17-alpine
 gradle:8-jdk17-focal
+gradle:8-jdk17-graal
+gradle:8-jdk17-graal-jammy
 gradle:8-jdk17-jammy
 gradle:8-jdk-alpine
 gradle:8-jdk-focal
+gradle:8-jdk-graal
+gradle:8-jdk-graal-jammy
 gradle:8-jdk-jammy
 gradle:8.2
 gradle:8.2-alpine
 gradle:8.2-focal
+gradle:8.2-graal
+gradle:8.2-graal-jammy
 gradle:8.2-jammy
 gradle:8.2-jdk
 gradle:8.2-jdk8
@@ -146,13 +154,19 @@ gradle:8.2-jdk11-jammy
 gradle:8.2-jdk17
 gradle:8.2-jdk17-alpine
 gradle:8.2-jdk17-focal
+gradle:8.2-jdk17-graal
+gradle:8.2-jdk17-graal-jammy
 gradle:8.2-jdk17-jammy
 gradle:8.2-jdk-alpine
 gradle:8.2-jdk-focal
+gradle:8.2-jdk-graal
+gradle:8.2-jdk-graal-jammy
 gradle:8.2-jdk-jammy
 gradle:8.2.1
 gradle:8.2.1-alpine
 gradle:8.2.1-focal
+gradle:8.2.1-graal
+gradle:8.2.1-graal-jammy
 gradle:8.2.1-jammy
 gradle:8.2.1-jdk
 gradle:8.2.1-jdk8
@@ -165,12 +179,18 @@ gradle:8.2.1-jdk11-jammy
 gradle:8.2.1-jdk17
 gradle:8.2.1-jdk17-alpine
 gradle:8.2.1-jdk17-focal
+gradle:8.2.1-jdk17-graal
+gradle:8.2.1-jdk17-graal-jammy
 gradle:8.2.1-jdk17-jammy
 gradle:8.2.1-jdk-alpine
 gradle:8.2.1-jdk-focal
+gradle:8.2.1-jdk-graal
+gradle:8.2.1-jdk-graal-jammy
 gradle:8.2.1-jdk-jammy
 gradle:alpine
 gradle:focal
+gradle:graal
+gradle:graal-jammy
 gradle:jammy
 gradle:jdk
 gradle:jdk8
@@ -183,8 +203,12 @@ gradle:jdk11-jammy
 gradle:jdk17
 gradle:jdk17-alpine
 gradle:jdk17-focal
+gradle:jdk17-graal
+gradle:jdk17-graal-jammy
 gradle:jdk17-jammy
 gradle:jdk-alpine
 gradle:jdk-focal
+gradle:jdk-graal
+gradle:jdk-graal-jammy
 gradle:jdk-jammy
 gradle:latest
diff --git a/_bashbrew-list-build-order b/_bashbrew-list-build-order
index 2c29fea..fae6b11 100644
--- a/_bashbrew-list-build-order
+++ b/_bashbrew-list-build-order
@@ -22,3 +22,4 @@ gradle:jdk11-focal
 gradle:jammy
 gradle:alpine
 gradle:focal
+gradle:graal-jammy
diff --git a/gradle_alpine/Dockerfile b/gradle_alpine/Dockerfile
index 873be32..d4f62bc 100644
--- a/gradle_alpine/Dockerfile
+++ b/gradle_alpine/Dockerfile
@@ -38,7 +38,7 @@ RUN set -o errexit -o nounset \
     && echo "Downloading Gradle" \
     && wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \
     \
-    && echo "Checking download hash" \
+    && echo "Checking Gradle download hash" \
     && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum -c - \
     \
     && echo "Installing Gradle" \
diff --git a/gradle_focal/Dockerfile b/gradle_focal/Dockerfile
index a68f94f..f861fe0 100644
--- a/gradle_focal/Dockerfile
+++ b/gradle_focal/Dockerfile
@@ -45,7 +45,7 @@ RUN set -o errexit -o nounset \
     && echo "Downloading Gradle" \
     && wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \
     \
-    && echo "Checking download hash" \
+    && echo "Checking Gradle download hash" \
     && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \
     \
     && echo "Installing Gradle" \
diff --git a/gradle_focal/Dockerfile b/gradle_graal-jammy/Dockerfile
similarity index 45%
copy from gradle_focal/Dockerfile
copy to gradle_graal-jammy/Dockerfile
index a68f94f..b3b8744 100644
--- a/gradle_focal/Dockerfile
+++ b/gradle_graal-jammy/Dockerfile
@@ -1,4 +1,4 @@
-FROM eclipse-temurin:17-jdk-focal
+FROM ubuntu:jammy
 
 CMD ["gradle"]
 
@@ -9,7 +9,6 @@ RUN set -o errexit -o nounset \
     && groupadd --system --gid 1000 gradle \
     && useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
     && mkdir /home/gradle/.gradle \
-    && chown --recursive gradle:gradle /home/gradle \
     \
     && echo "Symlinking root Gradle cache to gradle Gradle cache" \
     && ln --symbolic /home/gradle/.gradle /root/.gradle
@@ -19,11 +18,24 @@ VOLUME /home/gradle/.gradle
 WORKDIR /home/gradle
 
 RUN set -o errexit -o nounset \
+    && export DEBIAN_FRONTEND=noninteractive \
     && apt-get update \
     && apt-get install --yes --no-install-recommends \
+        binutils \
+        ca-certificates \
+        curl \
+        fontconfig \
+        locales \
+        p11-kit \
+        tzdata \
         unzip \
         wget \
         \
+        gcc \
+        libc-dev \
+        libz-dev \
+        zlib1g-dev \
+        \
         bzr \
         git \
         git-lfs \
@@ -39,13 +51,45 @@ RUN set -o errexit -o nounset \
     && which hg \
     && which svn
 
+ENV JAVA_HOME=/opt/java/graalvm
+RUN set -o errexit -o nounset \
+    && mkdir /opt/java \
+    \
+    && echo "Downloading GraalVM" \
+    && JDK_VERSION=17.0.8 \
+    && GRAALVM_DOWNLOAD_SHA256=1dffdf5c7cc5bf38558e9f093eef6a14072a6dff0be3a9906208b37b53ecc009 \
+    && ARCHITECTURE=$(dpkg --print-architecture) \
+    && if [ "${ARCHITECTURE}" = "amd64" ]; then GRAALVM_ARCHITECTURE=linux-x64; fi \
+    && if [ "${ARCHITECTURE}" = "arm64" ]; then GRAALVM_ARCHITECTURE=linux-aarch64; fi \
+    && GRAALVM_PKG=https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${JDK_VERSION}/graalvm-community-jdk-${JDK_VERSION}_${GRAALVM_ARCHITECTURE}_bin.tar.gz \
+    && wget --no-verbose --output-document=graalvm.tar.gz "${GRAALVM_PKG}" \
+    \
+    && echo "Checking GraalVM download hash" \
+    && echo "${GRAALVM_DOWNLOAD_SHA256} *graalvm.tar.gz" | sha256sum --check - \
+    \
+    && echo "Installing GraalVM" \
+    && tar --extract --gunzip --file graalvm.tar.gz \
+    && rm graalvm.tar.gz \
+    && mv graalvm-* "${JAVA_HOME}" \
+    && for bin in "$JAVA_HOME/bin/"*; do \
+        base="$(basename "$bin")"; \
+        [ ! -e "/usr/bin/$base" ]; \
+        update-alternatives --install "/usr/bin/${base}" "${base}" "${bin}" 1; \
+    done \
+    \
+    && echo "Testing GraalVM installation" \
+    && java --version \
+    && javac --version \
+    && gu --version \
+    && native-image --version
+
 ENV GRADLE_VERSION 8.2.1
 ARG GRADLE_DOWNLOAD_SHA256=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1
 RUN set -o errexit -o nounset \
     && echo "Downloading Gradle" \
     && wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \
     \
-    && echo "Checking download hash" \
+    && echo "Checking Gradle download hash" \
     && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \
     \
     && echo "Installing Gradle" \
@@ -55,4 +99,7 @@ RUN set -o errexit -o nounset \
     && ln --symbolic "${GRADLE_HOME}/bin/gradle" /usr/bin/gradle \
     \
     && echo "Testing Gradle installation" \
-    && gradle --version
+    && gradle --version \
+    \
+    # chown last so that it applies to /home/gradle/.gradle/native
+    && chown --recursive gradle:gradle /home/gradle
diff --git a/gradle_jammy/Dockerfile b/gradle_jammy/Dockerfile
index 9863916..002ae40 100644
--- a/gradle_jammy/Dockerfile
+++ b/gradle_jammy/Dockerfile
@@ -45,7 +45,7 @@ RUN set -o errexit -o nounset \
     && echo "Downloading Gradle" \
     && wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \
     \
-    && echo "Checking download hash" \
+    && echo "Checking Gradle download hash" \
     && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \
     \
     && echo "Installing Gradle" \
diff --git a/gradle_jdk11-alpine/Dockerfile b/gradle_jdk11-alpine/Dockerfile
index 59524f7..65d8a82 100644
--- a/gradle_jdk11-alpine/Dockerfile
+++ b/gradle_jdk11-alpine/Dockerfile
@@ -38,7 +38,7 @@ RUN set -o errexit -o nounset \
     && echo "Downloading Gradle" \
     && wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \
     \
-    && echo "Checking download hash" \
+    && echo "Checking Gradle download hash" \
     && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum -c - \
     \
     && echo "Installing Gradle" \
diff --git a/gradle_jdk11-focal/Dockerfile b/gradle_jdk11-focal/Dockerfile
index d75db18..384b44e 100644
--- a/gradle_jdk11-focal/Dockerfile
+++ b/gradle_jdk11-focal/Dockerfile
@@ -45,7 +45,7 @@ RUN set -o errexit -o nounset \
     && echo "Downloading Gradle" \
     && wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \
     \
-    && echo "Checking download hash" \
+    && echo "Checking Gradle download hash" \
     && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \
     \
     && echo "Installing Gradle" \
diff --git a/gradle_jdk11-jammy/Dockerfile b/gradle_jdk11-jammy/Dockerfile
index 4c63b60..4590a8f 100644
--- a/gradle_jdk11-jammy/Dockerfile
+++ b/gradle_jdk11-jammy/Dockerfile
@@ -45,7 +45,7 @@ RUN set -o errexit -o nounset \
     && echo "Downloading Gradle" \
     && wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \
     \
-    && echo "Checking download hash" \
+    && echo "Checking Gradle download hash" \
     && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \
     \
     && echo "Installing Gradle" \
diff --git a/gradle_jdk8-focal/Dockerfile b/gradle_jdk8-focal/Dockerfile
index 6b00ff1..e541163 100644
--- a/gradle_jdk8-focal/Dockerfile
+++ b/gradle_jdk8-focal/Dockerfile
@@ -45,7 +45,7 @@ RUN set -o errexit -o nounset \
     && echo "Downloading Gradle" \
     && wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \
     \
-    && echo "Checking download hash" \
+    && echo "Checking Gradle download hash" \
     && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \
     \
     && echo "Installing Gradle" \
diff --git a/gradle_jdk8-jammy/Dockerfile b/gradle_jdk8-jammy/Dockerfile
index ad018a1..f1ecba9 100644
--- a/gradle_jdk8-jammy/Dockerfile
+++ b/gradle_jdk8-jammy/Dockerfile
@@ -45,7 +45,7 @@ RUN set -o errexit -o nounset \
     && echo "Downloading Gradle" \
     && wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \
     \
-    && echo "Checking download hash" \
+    && echo "Checking Gradle download hash" \
     && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \
     \
     && echo "Installing Gradle" \

Relevant Maintainers:

@yosifkit yosifkit changed the title Add GraalVM image Gradle: Add GraalVM image Aug 15, 2023
@yosifkit yosifkit merged commit ec302a8 into docker-library:master Aug 15, 2023
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants