From 45d763b1ebd339ced1f0bcfdc1b74052111a52cf Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Tue, 20 Dec 2022 16:32:54 +0000 Subject: [PATCH] Add GraalVM EE (Enterprise Edition) --- .github/workflows/docker-image.yml | 2 ++ 11-EE/Dockerfile | 43 ++++++++++++++++++++++++++++++ 11-EE/entrypoint.sh | 12 +++++++++ 17-EE/Dockerfile | 43 ++++++++++++++++++++++++++++++ 17-EE/entrypoint.sh | 15 +++++++++++ README.md | 21 ++++++++++++--- 6 files changed, 133 insertions(+), 3 deletions(-) create mode 100644 11-EE/Dockerfile create mode 100644 11-EE/entrypoint.sh create mode 100644 17-EE/Dockerfile create mode 100644 17-EE/entrypoint.sh diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 21a6287..73b5896 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -17,6 +17,8 @@ jobs: - 11 - 17 - 19 + - 11-EE + - 17-EE steps: - name: Checkout uses: actions/checkout@v3 diff --git a/11-EE/Dockerfile b/11-EE/Dockerfile new file mode 100644 index 0000000..b61d4c8 --- /dev/null +++ b/11-EE/Dockerfile @@ -0,0 +1,43 @@ +# ---------------------------------- +# Pterodactyl Core Dockerfile +# Environment: Java +# Minimum Panel Version: 1.7.0 +# ---------------------------------- +FROM ubuntu:22.04 + +ARG GRAAL_VERSION=22.3.0 +ARG JAVA_VERSION=11 + +MAINTAINER RikoDEV, + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update -y \ + && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 \ + && export ARCH=$(case ${TARGETPLATFORM:-linux/amd64} in \ + "linux/amd64") echo "amd64" ;; \ + "linux/arm64") echo "aarch64" ;; \ + *) echo "" ;; esac) \ + && echo "ARCH=$ARCH" \ + && curl --retry 3 -Lfso /tmp/graalvm.tar.gz https://oca.opensource.oracle.com/gds/GRAALVM_EE_JAVA${JAVA_VERSION}_${GRAAL_VERSION//./_}/graalvm-ee-java${JAVA_VERSION}-linux-${ARCH}-${GRAAL_VERSION}.tar.gz \ + && mkdir -p /opt/java/graalvm \ + && cd /opt/java/graalvm \ + && tar -xf /tmp/graalvm.tar.gz --strip-components=1 \ + && export PATH="/opt/java/graalvm/bin:$PATH" \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /tmp/graalvm.tar.gz + +ENV JAVA_HOME=/opt/java/graalvm \ + PATH="/opt/java/graalvm/bin:$PATH" + +# Step 2 - add pterodactyl stuff +RUN useradd -d /home/container -m container + +USER container +ENV USER=container HOME=/home/container + +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh + +CMD ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file diff --git a/11-EE/entrypoint.sh b/11-EE/entrypoint.sh new file mode 100644 index 0000000..5e92f79 --- /dev/null +++ b/11-EE/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash +cd /home/container + +# Output Current Java Version +java -version ## only really needed to show what version is being used. Should be changed for different applications + +# Replace Startup Variables +MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +${MODIFIED_STARTUP} diff --git a/17-EE/Dockerfile b/17-EE/Dockerfile new file mode 100644 index 0000000..839a1a1 --- /dev/null +++ b/17-EE/Dockerfile @@ -0,0 +1,43 @@ +# ---------------------------------- +# Pterodactyl Core Dockerfile +# Environment: Java +# Minimum Panel Version: 1.7.0 +# ---------------------------------- +FROM ubuntu:22.04 + +ARG GRAAL_VERSION=22.3.0 +ARG JAVA_VERSION=17 + +MAINTAINER RikoDEV, + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update -y \ + && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 \ + && export ARCH=$(case ${TARGETPLATFORM:-linux/amd64} in \ + "linux/amd64") echo "amd64" ;; \ + "linux/arm64") echo "aarch64" ;; \ + *) echo "" ;; esac) \ + && echo "ARCH=$ARCH" \ + && curl --retry 3 -Lfso /tmp/graalvm.tar.gz https://oca.opensource.oracle.com/gds/GRAALVM_EE_JAVA${JAVA_VERSION}_${GRAAL_VERSION//./_}/graalvm-ee-java${JAVA_VERSION}-linux-${ARCH}-${GRAAL_VERSION}.tar.gz \ + && mkdir -p /opt/java/graalvm \ + && cd /opt/java/graalvm \ + && tar -xf /tmp/graalvm.tar.gz --strip-components=1 \ + && export PATH="/opt/java/graalvm/bin:$PATH" \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /tmp/graalvm.tar.gz + +ENV JAVA_HOME=/opt/java/graalvm \ + PATH="/opt/java/graalvm/bin:$PATH" + +# Step 2 - add pterodactyl stuff +RUN useradd -d /home/container -m container + +USER container +ENV USER=container HOME=/home/container + +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh + +CMD ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file diff --git a/17-EE/entrypoint.sh b/17-EE/entrypoint.sh new file mode 100644 index 0000000..9b727f6 --- /dev/null +++ b/17-EE/entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/bash +cd /home/container + +# Print Java version +java -version + +# Make internal Docker IP address available to processes. +export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` + +# Replace Startup Variables +MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/README.md b/README.md index 8d4b9d2..acb8004 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,33 @@ ![license mit](https://img.shields.io/badge/license-MIT-green) GraalVM is a high-performance runtime that provides significant improvements in application performance and efficiency which is ideal for microservices. https://www.graalvm.org/ + ___ + ## Docker Container Configuration -### Version: GraalVM 22.3.0 | Java 11 +### Version: GraalVM (CE, Community Edition) 22.3.0 | Java 11 + > ghcr.io/rikodev/pterodactyl-graalvm:11 -### Version: GraalVM 22.3.0 | Java 17 +**Enterprise Edition (EE):** + +> ghcr.io/rikodev/pterodactyl-graalvm:11-EE + +### Version: GraalVM (CE, Community Edition) 22.3.0 | Java 17 + > ghcr.io/rikodev/pterodactyl-graalvm:17 -### Version: GraalVM 22.3.0 | Java 19 +**Enterprise Edition (EE):** + +> ghcr.io/rikodev/pterodactyl-graalvm:17-EE + +### Version: GraalVM (CE, Community Edition) 22.3.0 | Java 19 + > ghcr.io/rikodev/pterodactyl-graalvm:19 ___ + ## Sponsor + [![poszukaj.se](https://poszukaj.se/storage/branding/wetrackyouplay.jpg)](https://poszukaj.se/)