-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #290 from keeganwitt/java-22
Add Java 22 images
- Loading branch information
Showing
6 changed files
with
258 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
FROM eclipse-temurin:22-jdk-alpine | ||
|
||
CMD ["gradle"] | ||
|
||
ENV GRADLE_HOME /opt/gradle | ||
|
||
RUN set -o errexit -o nounset \ | ||
&& echo "Adding gradle user and group" \ | ||
&& addgroup --system --gid 1000 gradle \ | ||
&& adduser --system --ingroup gradle --uid 1000 --shell /bin/ash gradle \ | ||
&& mkdir /home/gradle/.gradle \ | ||
&& chown -R gradle:gradle /home/gradle \ | ||
&& chmod -R o+rwx /home/gradle \ | ||
\ | ||
&& echo "Symlinking root Gradle cache to gradle Gradle cache" \ | ||
&& ln -s /home/gradle/.gradle /root/.gradle | ||
|
||
VOLUME /home/gradle/.gradle | ||
|
||
WORKDIR /home/gradle | ||
|
||
RUN set -o errexit -o nounset \ | ||
&& echo "Installing VCSes" \ | ||
&& apk add --no-cache \ | ||
git \ | ||
git-lfs \ | ||
mercurial \ | ||
subversion \ | ||
\ | ||
&& echo "Testing VCSes" \ | ||
&& which git \ | ||
&& which git-lfs \ | ||
&& which hg \ | ||
&& which svn | ||
|
||
ENV GRADLE_VERSION 8.8 | ||
ARG GRADLE_DOWNLOAD_SHA256=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612 | ||
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 Gradle download hash" \ | ||
&& echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum -c - \ | ||
\ | ||
&& echo "Installing Gradle" \ | ||
&& unzip gradle.zip \ | ||
&& rm gradle.zip \ | ||
&& mv "gradle-${GRADLE_VERSION}" "${GRADLE_HOME}/" \ | ||
&& ln -s "${GRADLE_HOME}/bin/gradle" /usr/bin/gradle | ||
|
||
USER gradle | ||
|
||
RUN set -o errexit -o nounset \ | ||
&& echo "Testing Gradle installation" \ | ||
&& gradle --version | ||
|
||
USER root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
FROM ubuntu:jammy | ||
|
||
CMD ["gradle"] | ||
|
||
ENV GRADLE_HOME /opt/gradle | ||
|
||
RUN set -o errexit -o nounset \ | ||
&& echo "Adding gradle user and group" \ | ||
&& 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 \ | ||
&& chmod -R o+rwx /home/gradle \ | ||
\ | ||
&& echo "Symlinking root Gradle cache to gradle Gradle cache" \ | ||
&& ln --symbolic /home/gradle/.gradle /root/.gradle | ||
|
||
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 \ | ||
mercurial \ | ||
openssh-client \ | ||
subversion \ | ||
&& rm --recursive --force /var/lib/apt/lists/* \ | ||
\ | ||
&& echo "Testing VCSes" \ | ||
&& which bzr \ | ||
&& which git \ | ||
&& which git-lfs \ | ||
&& which hg \ | ||
&& which svn | ||
|
||
ENV JAVA_HOME=/opt/java/graalvm | ||
ENV JAVA_VERSION=22.0.1 | ||
RUN set -o errexit -o nounset \ | ||
&& mkdir /opt/java \ | ||
\ | ||
&& echo "Downloading GraalVM" \ | ||
&& GRAALVM_AMD64_DOWNLOAD_SHA256=e34ec7e8e8c6a4bb99ab4fa32c3e04d01f2f2bd88920ddda7545fd35a0511f75 \ | ||
&& GRAALVM_AARCH64_DOWNLOAD_SHA256=2a510338cc6b63d2bb6aebe0ce0f8df9b76d9255207456cb1f0c9c820e6428cf \ | ||
&& 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-${JAVA_VERSION}/graalvm-community-jdk-${JAVA_VERSION}_${GRAALVM_ARCHITECTURE}_bin.tar.gz \ | ||
&& wget --no-verbose --output-document=graalvm.tar.gz "${GRAALVM_PKG}" \ | ||
\ | ||
&& echo "Checking GraalVM download hash" \ | ||
&& if [ "${ARCHITECTURE}" = "amd64" ]; then GRAALVM_DOWNLOAD_SHA256="${GRAALVM_AMD64_DOWNLOAD_SHA256}"; fi \ | ||
&& if [ "${ARCHITECTURE}" = "arm64" ]; then GRAALVM_DOWNLOAD_SHA256="${GRAALVM_AARCH64_DOWNLOAD_SHA256}"; fi \ | ||
&& 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 \ | ||
&& native-image --version | ||
|
||
ENV GRADLE_VERSION 8.8 | ||
ARG GRADLE_DOWNLOAD_SHA256=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612 | ||
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 Gradle download hash" \ | ||
&& echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \ | ||
\ | ||
&& echo "Installing Gradle" \ | ||
&& unzip gradle.zip \ | ||
&& rm gradle.zip \ | ||
&& mv "gradle-${GRADLE_VERSION}" "${GRADLE_HOME}/" \ | ||
&& ln --symbolic "${GRADLE_HOME}/bin/gradle" /usr/bin/gradle | ||
|
||
USER gradle | ||
|
||
RUN set -o errexit -o nounset \ | ||
&& echo "Testing Gradle installation" \ | ||
&& gradle --version | ||
|
||
USER root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
FROM eclipse-temurin:22-jdk-jammy | ||
|
||
CMD ["gradle"] | ||
|
||
ENV GRADLE_HOME /opt/gradle | ||
|
||
RUN set -o errexit -o nounset \ | ||
&& echo "Adding gradle user and group" \ | ||
&& 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 \ | ||
&& chmod --recursive o+rwx /home/gradle \ | ||
\ | ||
&& echo "Symlinking root Gradle cache to gradle Gradle cache" \ | ||
&& ln --symbolic /home/gradle/.gradle /root/.gradle | ||
|
||
VOLUME /home/gradle/.gradle | ||
|
||
WORKDIR /home/gradle | ||
|
||
RUN set -o errexit -o nounset \ | ||
&& apt-get update \ | ||
&& apt-get install --yes --no-install-recommends \ | ||
unzip \ | ||
wget \ | ||
\ | ||
bzr \ | ||
git \ | ||
git-lfs \ | ||
mercurial \ | ||
openssh-client \ | ||
subversion \ | ||
&& rm --recursive --force /var/lib/apt/lists/* \ | ||
\ | ||
&& echo "Testing VCSes" \ | ||
&& which bzr \ | ||
&& which git \ | ||
&& which git-lfs \ | ||
&& which hg \ | ||
&& which svn | ||
|
||
ENV GRADLE_VERSION 8.8 | ||
ARG GRADLE_DOWNLOAD_SHA256=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612 | ||
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 Gradle download hash" \ | ||
&& echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \ | ||
\ | ||
&& echo "Installing Gradle" \ | ||
&& unzip gradle.zip \ | ||
&& rm gradle.zip \ | ||
&& mv "gradle-${GRADLE_VERSION}" "${GRADLE_HOME}/" \ | ||
&& ln --symbolic "${GRADLE_HOME}/bin/gradle" /usr/bin/gradle | ||
|
||
USER gradle | ||
|
||
RUN set -o errexit -o nounset \ | ||
&& echo "Testing Gradle installation" \ | ||
&& gradle --version | ||
|
||
USER root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters