-
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 Java 12 AdoptOpenJDK image (closes #91)
- Loading branch information
1 parent
d52418e
commit 3bf4848
Showing
7 changed files
with
214 additions
and
0 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
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,40 @@ | ||
FROM adoptopenjdk/openjdk12:alpine | ||
|
||
CMD ["gradle"] | ||
|
||
ENV GRADLE_HOME /opt/gradle | ||
|
||
RUN set -o errexit -o nounset \ | ||
&& echo "Adding gradle user and group" \ | ||
&& addgroup -S -g 1000 gradle \ | ||
&& adduser -D -S -G gradle -u 1000 -s /bin/ash gradle \ | ||
&& mkdir /home/gradle/.gradle \ | ||
&& chown -R gradle:gradle /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 | ||
|
||
ENV GRADLE_VERSION 5.4.1 | ||
ARG GRADLE_DOWNLOAD_SHA256=7bdbad1e4f54f13c8a78abc00c26d44dd8709d4aedb704d913fb1bb78ac025dc | ||
RUN set -o errexit -o nounset \ | ||
&& echo "Downloading Gradle" \ | ||
&& wget -qO gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \ | ||
\ | ||
&& echo "Checking download hash" \ | ||
&& echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum -c - \ | ||
\ | ||
&& echo "Installing Gradle" \ | ||
&& unzip gradle.zip \ | ||
&& rm gradle.zip \ | ||
&& mkdir -p /opt \ | ||
&& mv "gradle-${GRADLE_VERSION}" "${GRADLE_HOME}/" \ | ||
&& ln -s "${GRADLE_HOME}/bin/gradle" /usr/bin/gradle \ | ||
\ | ||
&& echo "Testing Gradle installation" \ | ||
&& gradle --version | ||
|
||
USER gradle |
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,45 @@ | ||
FROM adoptopenjdk/openjdk12:slim | ||
|
||
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 -s /home/gradle/.gradle /root/.gradle | ||
|
||
VOLUME /home/gradle/.gradle | ||
|
||
WORKDIR /home/gradle | ||
|
||
RUN apt-get update \ | ||
&& apt-get install --yes --no-install-recommends \ | ||
unzip \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV GRADLE_VERSION 5.4.1 | ||
ARG GRADLE_DOWNLOAD_SHA256=7bdbad1e4f54f13c8a78abc00c26d44dd8709d4aedb704d913fb1bb78ac025dc | ||
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 | ||
|
||
USER gradle |
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,39 @@ | ||
FROM adoptopenjdk/openjdk12:latest | ||
|
||
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 -s /home/gradle/.gradle /root/.gradle | ||
|
||
VOLUME /home/gradle/.gradle | ||
|
||
WORKDIR /home/gradle | ||
|
||
ENV GRADLE_VERSION 5.4.1 | ||
ARG GRADLE_DOWNLOAD_SHA256=7bdbad1e4f54f13c8a78abc00c26d44dd8709d4aedb704d913fb1bb78ac025dc | ||
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 | ||
|
||
USER gradle |
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,40 @@ | ||
FROM adoptopenjdk/openjdk12:alpine-jre | ||
|
||
CMD ["gradle"] | ||
|
||
ENV GRADLE_HOME /opt/gradle | ||
|
||
RUN set -o errexit -o nounset \ | ||
&& echo "Adding gradle user and group" \ | ||
&& addgroup -S -g 1000 gradle \ | ||
&& adduser -D -S -G gradle -u 1000 -s /bin/ash gradle \ | ||
&& mkdir /home/gradle/.gradle \ | ||
&& chown -R gradle:gradle /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 | ||
|
||
ENV GRADLE_VERSION 5.4.1 | ||
ARG GRADLE_DOWNLOAD_SHA256=7bdbad1e4f54f13c8a78abc00c26d44dd8709d4aedb704d913fb1bb78ac025dc | ||
RUN set -o errexit -o nounset \ | ||
&& echo "Downloading Gradle" \ | ||
&& wget -qO gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \ | ||
\ | ||
&& echo "Checking download hash" \ | ||
&& echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum -c - \ | ||
\ | ||
&& echo "Installing Gradle" \ | ||
&& unzip gradle.zip \ | ||
&& rm gradle.zip \ | ||
&& mkdir -p /opt \ | ||
&& mv "gradle-${GRADLE_VERSION}" "${GRADLE_HOME}/" \ | ||
&& ln -s "${GRADLE_HOME}/bin/gradle" /usr/bin/gradle \ | ||
\ | ||
&& echo "Testing Gradle installation" \ | ||
&& gradle --version | ||
|
||
USER gradle |
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,39 @@ | ||
FROM adoptopenjdk/openjdk12:jre | ||
|
||
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 -s /home/gradle/.gradle /root/.gradle | ||
|
||
VOLUME /home/gradle/.gradle | ||
|
||
WORKDIR /home/gradle | ||
|
||
ENV GRADLE_VERSION 5.4.1 | ||
ARG GRADLE_DOWNLOAD_SHA256=7bdbad1e4f54f13c8a78abc00c26d44dd8709d4aedb704d913fb1bb78ac025dc | ||
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 | ||
|
||
USER gradle |