From 57dde101ada5e269c6985173aa4aa1340b1bf5a9 Mon Sep 17 00:00:00 2001 From: RikoDEV <18230443+RikoDEV@users.noreply.github.com> Date: Sun, 18 Jun 2023 21:25:41 +0200 Subject: [PATCH 1/9] UTF-8 characters --- 11-EE/Dockerfile | 3 +++ 11/Dockerfile | 3 +++ 17-EE/Dockerfile | 3 +++ 17/Dockerfile | 3 +++ 19/Dockerfile | 3 +++ 5 files changed, 15 insertions(+) diff --git a/11-EE/Dockerfile b/11-EE/Dockerfile index 402fdc6..02dbd7e 100644 --- a/11-EE/Dockerfile +++ b/11-EE/Dockerfile @@ -13,6 +13,9 @@ MAINTAINER RikoDEV, ENV DEBIAN_FRONTEND=noninteractive +# Default to UTF-8 file.encoding +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + RUN apt-get update -y \ && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 \ && case ${TARGETPLATFORM} in \ diff --git a/11/Dockerfile b/11/Dockerfile index 18b8b9a..75b691a 100644 --- a/11/Dockerfile +++ b/11/Dockerfile @@ -13,6 +13,9 @@ MAINTAINER RikoDEV, ENV DEBIAN_FRONTEND=noninteractive +# Default to UTF-8 file.encoding +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + RUN apt-get update -y \ && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 \ && case ${TARGETPLATFORM} in \ diff --git a/17-EE/Dockerfile b/17-EE/Dockerfile index c116351..ef55213 100644 --- a/17-EE/Dockerfile +++ b/17-EE/Dockerfile @@ -13,6 +13,9 @@ MAINTAINER RikoDEV, ENV DEBIAN_FRONTEND=noninteractive +# Default to UTF-8 file.encoding +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + RUN apt-get update -y \ && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 \ && case ${TARGETPLATFORM} in \ diff --git a/17/Dockerfile b/17/Dockerfile index d74dfd7..05be241 100644 --- a/17/Dockerfile +++ b/17/Dockerfile @@ -13,6 +13,9 @@ MAINTAINER RikoDEV, ENV DEBIAN_FRONTEND=noninteractive +# Default to UTF-8 file.encoding +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + RUN apt-get update -y \ && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 \ && case ${TARGETPLATFORM} in \ diff --git a/19/Dockerfile b/19/Dockerfile index 755fcda..7b16afa 100644 --- a/19/Dockerfile +++ b/19/Dockerfile @@ -13,6 +13,9 @@ MAINTAINER RikoDEV, ENV DEBIAN_FRONTEND=noninteractive +# Default to UTF-8 file.encoding +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + RUN apt-get update -y \ && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 \ && case ${TARGETPLATFORM} in \ From 2070b0a1dec54c1d86cbae2ef212f319ffcfe773 Mon Sep 17 00:00:00 2001 From: RikoDEV <18230443+RikoDEV@users.noreply.github.com> Date: Sun, 18 Jun 2023 21:37:13 +0200 Subject: [PATCH 2/9] Fix: UTF-8 characters --- 11-EE/Dockerfile | 4 +++- 11/Dockerfile | 4 +++- 17-EE/Dockerfile | 4 +++- 17/Dockerfile | 4 +++- 19/Dockerfile | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/11-EE/Dockerfile b/11-EE/Dockerfile index 02dbd7e..d5aab73 100644 --- a/11-EE/Dockerfile +++ b/11-EE/Dockerfile @@ -17,7 +17,9 @@ ENV DEBIAN_FRONTEND=noninteractive ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN apt-get update -y \ - && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 \ + && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata locales iproute2 \ + && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ + && locale-gen en_US.UTF-8 \ && case ${TARGETPLATFORM} in \ "linux/amd64") ARCH=linux-amd64 ;; \ "linux/arm64") ARCH=linux-aarch64 ;; \ diff --git a/11/Dockerfile b/11/Dockerfile index 75b691a..30113f8 100644 --- a/11/Dockerfile +++ b/11/Dockerfile @@ -17,7 +17,9 @@ ENV DEBIAN_FRONTEND=noninteractive ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN apt-get update -y \ - && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 \ + && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata locales iproute2 \ + && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ + && locale-gen en_US.UTF-8 \ && case ${TARGETPLATFORM} in \ "linux/amd64") ARCH=amd64 ;; \ "linux/arm64") ARCH=aarch64 ;; \ diff --git a/17-EE/Dockerfile b/17-EE/Dockerfile index ef55213..0ee74b5 100644 --- a/17-EE/Dockerfile +++ b/17-EE/Dockerfile @@ -17,7 +17,9 @@ ENV DEBIAN_FRONTEND=noninteractive ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN apt-get update -y \ - && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 \ + && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata locales iproute2 \ + && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ + && locale-gen en_US.UTF-8 \ && case ${TARGETPLATFORM} in \ "linux/amd64") ARCH=linux-amd64 ;; \ "linux/arm64") ARCH=linux-aarch64 ;; \ diff --git a/17/Dockerfile b/17/Dockerfile index 05be241..6fc5217 100644 --- a/17/Dockerfile +++ b/17/Dockerfile @@ -17,7 +17,9 @@ ENV DEBIAN_FRONTEND=noninteractive ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN apt-get update -y \ - && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 \ + && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata locales iproute2 \ + && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ + && locale-gen en_US.UTF-8 \ && case ${TARGETPLATFORM} in \ "linux/amd64") ARCH=amd64 ;; \ "linux/arm64") ARCH=aarch64 ;; \ diff --git a/19/Dockerfile b/19/Dockerfile index 7b16afa..110a8a7 100644 --- a/19/Dockerfile +++ b/19/Dockerfile @@ -17,7 +17,9 @@ ENV DEBIAN_FRONTEND=noninteractive ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN apt-get update -y \ - && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 \ + && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata locales iproute2 \ + && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ + && locale-gen en_US.UTF-8 \ && case ${TARGETPLATFORM} in \ "linux/amd64") ARCH=amd64 ;; \ "linux/arm64") ARCH=aarch64 ;; \ From 092f9f678fba7ce5d217b1ee87925e5041b9ada3 Mon Sep 17 00:00:00 2001 From: RikoDEV <18230443+RikoDEV@users.noreply.github.com> Date: Sun, 18 Jun 2023 22:06:14 +0200 Subject: [PATCH 3/9] Attemp to tidy entrypoints --- .github/workflows/docker-image.yml | 3 ++- 11-EE/Dockerfile | 2 +- 11-EE/entrypoint.sh | 12 ------------ 11/Dockerfile | 2 +- 11/entrypoint.sh | 12 ------------ 17-EE/Dockerfile | 2 +- 17/Dockerfile | 2 +- 17/entrypoint.sh | 15 --------------- 19/Dockerfile | 2 +- 19/entrypoint.sh | 15 --------------- 17-EE/entrypoint.sh => entrypoint.sh | 0 11 files changed, 7 insertions(+), 60 deletions(-) delete mode 100644 11-EE/entrypoint.sh delete mode 100644 11/entrypoint.sh delete mode 100644 17/entrypoint.sh delete mode 100644 19/entrypoint.sh rename 17-EE/entrypoint.sh => entrypoint.sh (100%) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 73b5896..27a3d57 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -52,7 +52,8 @@ jobs: - name: Build and push uses: docker/build-push-action@v3 with: - context: ./${{ matrix.tag }} + context: . + file: ./${{ matrix.tag }}/Dockerfile platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta_graalvm.outputs.tags }} diff --git a/11-EE/Dockerfile b/11-EE/Dockerfile index d5aab73..7fe57d0 100644 --- a/11-EE/Dockerfile +++ b/11-EE/Dockerfile @@ -43,6 +43,6 @@ ENV USER=container HOME=/home/container WORKDIR /home/container -COPY ./entrypoint.sh /entrypoint.sh +COPY ./../entrypoint.sh /entrypoint.sh CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/11-EE/entrypoint.sh b/11-EE/entrypoint.sh deleted file mode 100644 index 5e92f79..0000000 --- a/11-EE/entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/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/11/Dockerfile b/11/Dockerfile index 30113f8..4139dd2 100644 --- a/11/Dockerfile +++ b/11/Dockerfile @@ -43,6 +43,6 @@ ENV USER=container HOME=/home/container WORKDIR /home/container -COPY ./entrypoint.sh /entrypoint.sh +COPY ./../entrypoint.sh /entrypoint.sh CMD ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file diff --git a/11/entrypoint.sh b/11/entrypoint.sh deleted file mode 100644 index 5e92f79..0000000 --- a/11/entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 index 0ee74b5..92ff450 100644 --- a/17-EE/Dockerfile +++ b/17-EE/Dockerfile @@ -43,6 +43,6 @@ ENV USER=container HOME=/home/container WORKDIR /home/container -COPY ./entrypoint.sh /entrypoint.sh +COPY ./../entrypoint.sh /entrypoint.sh CMD ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file diff --git a/17/Dockerfile b/17/Dockerfile index 6fc5217..7f453d1 100644 --- a/17/Dockerfile +++ b/17/Dockerfile @@ -43,6 +43,6 @@ ENV USER=container HOME=/home/container WORKDIR /home/container -COPY ./entrypoint.sh /entrypoint.sh +COPY ./../entrypoint.sh /entrypoint.sh CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/17/entrypoint.sh b/17/entrypoint.sh deleted file mode 100644 index 9b727f6..0000000 --- a/17/entrypoint.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/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/19/Dockerfile b/19/Dockerfile index 110a8a7..9a59288 100644 --- a/19/Dockerfile +++ b/19/Dockerfile @@ -43,6 +43,6 @@ ENV USER=container HOME=/home/container WORKDIR /home/container -COPY ./entrypoint.sh /entrypoint.sh +COPY ./../entrypoint.sh /entrypoint.sh CMD ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file diff --git a/19/entrypoint.sh b/19/entrypoint.sh deleted file mode 100644 index 9b727f6..0000000 --- a/19/entrypoint.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/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/17-EE/entrypoint.sh b/entrypoint.sh similarity index 100% rename from 17-EE/entrypoint.sh rename to entrypoint.sh From 69492eb373b437c87dee0929bddfa1ac20dfbf98 Mon Sep 17 00:00:00 2001 From: RikoDEV <18230443+RikoDEV@users.noreply.github.com> Date: Sun, 18 Jun 2023 22:06:14 +0200 Subject: [PATCH 4/9] =?UTF-8?q?Tidy=20entrypoints=20=F0=9F=A7=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-image.yml | 3 ++- 11-EE/Dockerfile | 2 +- 11-EE/entrypoint.sh | 12 ------------ 11/Dockerfile | 2 +- 11/entrypoint.sh | 12 ------------ 17-EE/Dockerfile | 2 +- 17/Dockerfile | 2 +- 17/entrypoint.sh | 15 --------------- 19/Dockerfile | 2 +- 19/entrypoint.sh | 15 --------------- 17-EE/entrypoint.sh => entrypoint.sh | 0 11 files changed, 7 insertions(+), 60 deletions(-) delete mode 100644 11-EE/entrypoint.sh delete mode 100644 11/entrypoint.sh delete mode 100644 17/entrypoint.sh delete mode 100644 19/entrypoint.sh rename 17-EE/entrypoint.sh => entrypoint.sh (100%) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 73b5896..27a3d57 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -52,7 +52,8 @@ jobs: - name: Build and push uses: docker/build-push-action@v3 with: - context: ./${{ matrix.tag }} + context: . + file: ./${{ matrix.tag }}/Dockerfile platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta_graalvm.outputs.tags }} diff --git a/11-EE/Dockerfile b/11-EE/Dockerfile index d5aab73..7fe57d0 100644 --- a/11-EE/Dockerfile +++ b/11-EE/Dockerfile @@ -43,6 +43,6 @@ ENV USER=container HOME=/home/container WORKDIR /home/container -COPY ./entrypoint.sh /entrypoint.sh +COPY ./../entrypoint.sh /entrypoint.sh CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/11-EE/entrypoint.sh b/11-EE/entrypoint.sh deleted file mode 100644 index 5e92f79..0000000 --- a/11-EE/entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/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/11/Dockerfile b/11/Dockerfile index 30113f8..4139dd2 100644 --- a/11/Dockerfile +++ b/11/Dockerfile @@ -43,6 +43,6 @@ ENV USER=container HOME=/home/container WORKDIR /home/container -COPY ./entrypoint.sh /entrypoint.sh +COPY ./../entrypoint.sh /entrypoint.sh CMD ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file diff --git a/11/entrypoint.sh b/11/entrypoint.sh deleted file mode 100644 index 5e92f79..0000000 --- a/11/entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 index 0ee74b5..92ff450 100644 --- a/17-EE/Dockerfile +++ b/17-EE/Dockerfile @@ -43,6 +43,6 @@ ENV USER=container HOME=/home/container WORKDIR /home/container -COPY ./entrypoint.sh /entrypoint.sh +COPY ./../entrypoint.sh /entrypoint.sh CMD ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file diff --git a/17/Dockerfile b/17/Dockerfile index 6fc5217..7f453d1 100644 --- a/17/Dockerfile +++ b/17/Dockerfile @@ -43,6 +43,6 @@ ENV USER=container HOME=/home/container WORKDIR /home/container -COPY ./entrypoint.sh /entrypoint.sh +COPY ./../entrypoint.sh /entrypoint.sh CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/17/entrypoint.sh b/17/entrypoint.sh deleted file mode 100644 index 9b727f6..0000000 --- a/17/entrypoint.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/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/19/Dockerfile b/19/Dockerfile index 110a8a7..9a59288 100644 --- a/19/Dockerfile +++ b/19/Dockerfile @@ -43,6 +43,6 @@ ENV USER=container HOME=/home/container WORKDIR /home/container -COPY ./entrypoint.sh /entrypoint.sh +COPY ./../entrypoint.sh /entrypoint.sh CMD ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file diff --git a/19/entrypoint.sh b/19/entrypoint.sh deleted file mode 100644 index 9b727f6..0000000 --- a/19/entrypoint.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/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/17-EE/entrypoint.sh b/entrypoint.sh similarity index 100% rename from 17-EE/entrypoint.sh rename to entrypoint.sh From 8592e54ebdaf768220be4c99efbad2a372443257 Mon Sep 17 00:00:00 2001 From: RikoDEV <18230443+RikoDEV@users.noreply.github.com> Date: Fri, 30 Jun 2023 13:55:09 +0200 Subject: [PATCH 5/9] Fix #7, use parkervcp/yolks entrypoint --- entrypoint.sh | 52 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 9b727f6..e92f3d3 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,15 +1,49 @@ #!/bin/bash -cd /home/container + +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +# Default the TZ environment variable to UTC. +TZ=${TZ:-UTC} +export TZ + +# Set environment variable that holds the Internal Docker IP +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Switch to the container's working directory +cd /home/container || exit 1 # Print Java version +printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mjava -version\n" java -version -# Make internal Docker IP address available to processes. -export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` +# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell +# variable format of "${VARIABLE}" before evaluating the string and automatically +# replacing the values. +PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)") -# 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} +# Display the command we're running in the output, and then execute it with the env +# from the container itself. +printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0m%s\n" "$PARSED" +# shellcheck disable=SC2086 +eval ${PARSED} From dbf1b02f8ad9d734e89baa27cfa44f9edeee62e5 Mon Sep 17 00:00:00 2001 From: RikoDEV <18230443+RikoDEV@users.noreply.github.com> Date: Sun, 2 Jul 2023 16:39:06 +0200 Subject: [PATCH 6/9] Test JDK 20 image --- .github/workflows/docker-image.yml | 1 + 20-JDK/Dockerfile | 48 ++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 20-JDK/Dockerfile diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 27a3d57..a9db4a9 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -17,6 +17,7 @@ jobs: - 11 - 17 - 19 + - 20-JDK - 11-EE - 17-EE steps: diff --git a/20-JDK/Dockerfile b/20-JDK/Dockerfile new file mode 100644 index 0000000..a80d3c8 --- /dev/null +++ b/20-JDK/Dockerfile @@ -0,0 +1,48 @@ +# ---------------------------------- +# Pterodactyl Core Dockerfile +# Environment: Java +# Minimum Panel Version: 1.7.0 +# ---------------------------------- +FROM ubuntu:22.04 + +ARG TARGETPLATFORM +ARG GRAAL_VERSION=20.0.1 +ARG JAVA_VERSION=20 + +MAINTAINER RikoDEV, + +ENV DEBIAN_FRONTEND=noninteractive + +# Default to UTF-8 file.encoding +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update -y \ + && apt-get install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata locales iproute2 \ + && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ + && locale-gen en_US.UTF-8 \ + && case ${TARGETPLATFORM} in \ + "linux/amd64") ARCH=x86 ;; \ + "linux/arm64") ARCH=aarch64 ;; \ + esac \ + && curl --retry 3 -Lfso /tmp/graalvm.tar.gz https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${GRAAL_VERSION}/graalvm-community-jdk-${GRAAL_VERSION}_linux-${ARCH}_bin.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 From bf96a79604dd41f68f247c6e11faeb1057fce170 Mon Sep 17 00:00:00 2001 From: RikoDEV <18230443+RikoDEV@users.noreply.github.com> Date: Sun, 2 Jul 2023 16:46:31 +0200 Subject: [PATCH 7/9] Fix --- 20-JDK/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/20-JDK/Dockerfile b/20-JDK/Dockerfile index a80d3c8..d816ea9 100644 --- a/20-JDK/Dockerfile +++ b/20-JDK/Dockerfile @@ -21,7 +21,7 @@ RUN apt-get update -y \ && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ && locale-gen en_US.UTF-8 \ && case ${TARGETPLATFORM} in \ - "linux/amd64") ARCH=x86 ;; \ + "linux/amd64") ARCH=x64 ;; \ "linux/arm64") ARCH=aarch64 ;; \ esac \ && curl --retry 3 -Lfso /tmp/graalvm.tar.gz https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${GRAAL_VERSION}/graalvm-community-jdk-${GRAAL_VERSION}_linux-${ARCH}_bin.tar.gz \ From b4b5abf2e03f62ca72dd110e796cd4423639df44 Mon Sep 17 00:00:00 2001 From: Jacek Maciejak <18230443+RikoDEV@users.noreply.github.com> Date: Thu, 6 Jul 2023 11:49:13 +0200 Subject: [PATCH 8/9] Update README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 385be17..b146460 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,12 @@ ___ **Enterprise Edition (EE):** Not available +### Version: GraalVM (CE, Community Edition) 20.0.1 | Java 20 + +> ghcr.io/rikodev/pterodactyl-graalvm:20-JDK + +**Enterprise Edition (EE):** Not available + ___ ## Sponsor From 51f549a33584160a148fae95d84000f87e8f59ee Mon Sep 17 00:00:00 2001 From: Jacek Maciejak <18230443+RikoDEV@users.noreply.github.com> Date: Tue, 25 Jul 2023 19:00:53 +0200 Subject: [PATCH 9/9] 20-JDK: 20.0.2 --- 20-JDK/Dockerfile | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/20-JDK/Dockerfile b/20-JDK/Dockerfile index d816ea9..1c89c4c 100644 --- a/20-JDK/Dockerfile +++ b/20-JDK/Dockerfile @@ -6,7 +6,7 @@ FROM ubuntu:22.04 ARG TARGETPLATFORM -ARG GRAAL_VERSION=20.0.1 +ARG GRAAL_VERSION=20.0.2 ARG JAVA_VERSION=20 MAINTAINER RikoDEV, diff --git a/README.md b/README.md index b146460..cdb4f6b 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ ___ **Enterprise Edition (EE):** Not available -### Version: GraalVM (CE, Community Edition) 20.0.1 | Java 20 +### Version: GraalVM (CE, Community Edition) 20.0.2 | Java 20 > ghcr.io/rikodev/pterodactyl-graalvm:20-JDK