-
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.
Add images with GraalVM installed (closes #253)
- Loading branch information
1 parent
2ba8422
commit 21d137b
Showing
4 changed files
with
268 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,88 @@ | ||
FROM ubuntu:focal | ||
|
||
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 \ | ||
\ | ||
&& 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 \ | ||
\ | ||
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/graalvm | ||
ARG TARGETPLATFORM | ||
RUN set -o errexit -o nounset \ | ||
&& echo "Installing GraalVM" \ | ||
&& JDK_BUILD=17.0.8 \ | ||
&& GRAALVM_PKG=https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${JDK_BUILD}/graalvm-community-jdk-${JDK_BUILD}_GRAALVM_ARCH_bin.tar.gz \ | ||
&& if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then GRAALVM_PKG=$(echo "${GRAALVM_PKG}" | sed "s/GRAALVM_ARCH/linux-x64/"); fi \ | ||
&& if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then GRAALVM_PKG=$(echo "${GRAALVM_PKG}" | sed "s/GRAALVM_ARCH/linux-aarch64/"); fi \ | ||
&& curl --fail --silent --location --retry 3 ${GRAALVM_PKG} | gunzip | tar x -C /opt/ \ | ||
&& mv /opt/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 "${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 \ | ||
\ | ||
&& echo "Testing Gradle installation" \ | ||
&& gradle --version |
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,88 @@ | ||
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 \ | ||
\ | ||
&& 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 \ | ||
\ | ||
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/graalvm | ||
ARG TARGETPLATFORM | ||
RUN set -o errexit -o nounset \ | ||
&& echo "Installing GraalVM" \ | ||
&& JDK_BUILD=17.0.8 \ | ||
&& GRAALVM_PKG=https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${JDK_BUILD}/graalvm-community-jdk-${JDK_BUILD}_GRAALVM_ARCH_bin.tar.gz \ | ||
&& if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then GRAALVM_PKG=$(echo "${GRAALVM_PKG}" | sed "s/GRAALVM_ARCH/linux-x64/"); fi \ | ||
&& if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then GRAALVM_PKG=$(echo "${GRAALVM_PKG}" | sed "s/GRAALVM_ARCH/linux-aarch64/"); fi \ | ||
&& curl --fail --silent --location --retry 3 ${GRAALVM_PKG} | gunzip | tar x -C /opt/ \ | ||
&& mv /opt/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 "${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 \ | ||
\ | ||
&& echo "Testing Gradle installation" \ | ||
&& gradle --version |
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,88 @@ | ||
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 \ | ||
\ | ||
&& 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 \ | ||
\ | ||
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/graalvm | ||
ARG TARGETPLATFORM | ||
RUN set -o errexit -o nounset \ | ||
&& echo "Installing GraalVM" \ | ||
&& JDK_BUILD=20.0.2 \ | ||
&& GRAALVM_PKG=https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${JDK_BUILD}/graalvm-community-jdk-${JDK_BUILD}_GRAALVM_ARCH_bin.tar.gz \ | ||
&& if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then GRAALVM_PKG=$(echo "${GRAALVM_PKG}" | sed "s/GRAALVM_ARCH/linux-x64/"); fi \ | ||
&& if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then GRAALVM_PKG=$(echo "${GRAALVM_PKG}" | sed "s/GRAALVM_ARCH/linux-aarch64/"); fi \ | ||
&& curl --fail --silent --location --retry 3 ${GRAALVM_PKG} | gunzip | tar x -C /opt/ \ | ||
&& mv /opt/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 "${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 \ | ||
\ | ||
&& echo "Testing Gradle installation" \ | ||
&& gradle --version |