From b515b8a09e4f7dca35071c9aff949f6272f9272e Mon Sep 17 00:00:00 2001 From: Th3Dilli Date: Thu, 30 Sep 2021 22:54:38 +0200 Subject: [PATCH 01/10] add mohaa image --- .github/workflows/games.yml | 1 + README.md | 6 +++-- games/mohaa/Dockerfile | 22 +++++++++++++++++++ games/mohaa/entrypoint.sh | 44 +++++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 games/mohaa/Dockerfile create mode 100644 games/mohaa/entrypoint.sh diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml index 6d95474..258a506 100644 --- a/.github/workflows/games.yml +++ b/.github/workflows/games.yml @@ -18,6 +18,7 @@ jobs: - arma3 - fivem - source + - mohaa steps: - uses: actions/checkout@v2 - uses: docker/setup-buildx-action@v1 diff --git a/README.md b/README.md index 591624b..ee4c5ed 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,11 @@ is tagged correctly. * [`arma3`](/games/arma3) * `ghcr.io/parkervcp/games:arma3` * [`fivem`](/games/fivem) - * `ghcr.io/parkervcp/games:fivem` + * `ghcr.io/parkervcp/games:fivem` * [`source`](/games/source) - * `ghcr.io/parkervcp/games:source` + * `ghcr.io/parkervcp/games:source` + * [`mohaa`](games/mohaa) + * `ghcr.io/pterodactyl/games:mohaa` ### [Golang](/go) * [`go1.14`](/go/1.14) * `ghcr.io/parkervcp/yolks:go_1.14` diff --git a/games/mohaa/Dockerfile b/games/mohaa/Dockerfile new file mode 100644 index 0000000..51753da --- /dev/null +++ b/games/mohaa/Dockerfile @@ -0,0 +1,22 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim + +LABEL author="Manuel Dielacher" maintainer="th3dilli@gmx.at" + +LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN dpkg --add-architecture i386 \ + && apt update && apt upgrade -y \ + && apt install -y lib32gcc-s1 lib32stdc++6 libstdc++5:i386 locales \ + && update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales \ + && useradd -m -d /home/container -s /bin/bash container + +USER container +ENV USER=container HOME=/home/container +ENV DEBIAN_FRONTEND noninteractive + +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/games/mohaa/entrypoint.sh b/games/mohaa/entrypoint.sh new file mode 100644 index 0000000..7fecb8b --- /dev/null +++ b/games/mohaa/entrypoint.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# +# 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;exit}') +export INTERNAL_IP + +# Switch to the container's working directory +cd /home/container || exit 1 + +# 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 -)") + +# 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 +exec env ${PARSED} From 9754274aab34a8d94d60c27abb76914c172f62a8 Mon Sep 17 00:00:00 2001 From: Th3Dilli Date: Fri, 1 Oct 2021 18:23:55 +0200 Subject: [PATCH 02/10] add missing dependency for entrypoint.sh --- games/mohaa/Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/games/mohaa/Dockerfile b/games/mohaa/Dockerfile index 51753da..e030fdd 100644 --- a/games/mohaa/Dockerfile +++ b/games/mohaa/Dockerfile @@ -5,12 +5,12 @@ LABEL author="Manuel Dielacher" maintainer="th3dilli@gmx.at" LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" LABEL org.opencontainers.image.licenses=MIT -RUN dpkg --add-architecture i386 \ - && apt update && apt upgrade -y \ - && apt install -y lib32gcc-s1 lib32stdc++6 libstdc++5:i386 locales \ - && update-locale lang=en_US.UTF-8 \ - && dpkg-reconfigure --frontend noninteractive locales \ - && useradd -m -d /home/container -s /bin/bash container +RUN dpkg --add-architecture i386 \ + && apt update && apt upgrade -y \ + && apt install -y iproute2 locales lib32gcc-s1 lib32stdc++6 libstdc++5:i386 \ + && update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales \ + && useradd -m -d /home/container -s /bin/bash container USER container ENV USER=container HOME=/home/container From 586cdaa7937b6d9500e20fb90a8046802a994843 Mon Sep 17 00:00:00 2001 From: Th3Dilli Date: Wed, 15 Dec 2021 20:05:55 +0100 Subject: [PATCH 03/10] Revert "add missing dependency for entrypoint.sh" This reverts commit 9754274aab34a8d94d60c27abb76914c172f62a8. --- games/mohaa/Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/games/mohaa/Dockerfile b/games/mohaa/Dockerfile index e030fdd..51753da 100644 --- a/games/mohaa/Dockerfile +++ b/games/mohaa/Dockerfile @@ -5,12 +5,12 @@ LABEL author="Manuel Dielacher" maintainer="th3dilli@gmx.at" LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" LABEL org.opencontainers.image.licenses=MIT -RUN dpkg --add-architecture i386 \ - && apt update && apt upgrade -y \ - && apt install -y iproute2 locales lib32gcc-s1 lib32stdc++6 libstdc++5:i386 \ - && update-locale lang=en_US.UTF-8 \ - && dpkg-reconfigure --frontend noninteractive locales \ - && useradd -m -d /home/container -s /bin/bash container +RUN dpkg --add-architecture i386 \ + && apt update && apt upgrade -y \ + && apt install -y lib32gcc-s1 lib32stdc++6 libstdc++5:i386 locales \ + && update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales \ + && useradd -m -d /home/container -s /bin/bash container USER container ENV USER=container HOME=/home/container From 4fb11156b85cfc9b9698dedce04d902da9a6af54 Mon Sep 17 00:00:00 2001 From: Th3Dilli Date: Wed, 15 Dec 2021 20:06:09 +0100 Subject: [PATCH 04/10] Revert "add mohaa image" This reverts commit b515b8a09e4f7dca35071c9aff949f6272f9272e. --- .github/workflows/games.yml | 1 - README.md | 6 ++--- games/mohaa/Dockerfile | 22 ------------------- games/mohaa/entrypoint.sh | 44 ------------------------------------- 4 files changed, 2 insertions(+), 71 deletions(-) delete mode 100644 games/mohaa/Dockerfile delete mode 100644 games/mohaa/entrypoint.sh diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml index 258a506..6d95474 100644 --- a/.github/workflows/games.yml +++ b/.github/workflows/games.yml @@ -18,7 +18,6 @@ jobs: - arma3 - fivem - source - - mohaa steps: - uses: actions/checkout@v2 - uses: docker/setup-buildx-action@v1 diff --git a/README.md b/README.md index ee4c5ed..591624b 100644 --- a/README.md +++ b/README.md @@ -64,11 +64,9 @@ is tagged correctly. * [`arma3`](/games/arma3) * `ghcr.io/parkervcp/games:arma3` * [`fivem`](/games/fivem) - * `ghcr.io/parkervcp/games:fivem` + * `ghcr.io/parkervcp/games:fivem` * [`source`](/games/source) - * `ghcr.io/parkervcp/games:source` - * [`mohaa`](games/mohaa) - * `ghcr.io/pterodactyl/games:mohaa` + * `ghcr.io/parkervcp/games:source` ### [Golang](/go) * [`go1.14`](/go/1.14) * `ghcr.io/parkervcp/yolks:go_1.14` diff --git a/games/mohaa/Dockerfile b/games/mohaa/Dockerfile deleted file mode 100644 index 51753da..0000000 --- a/games/mohaa/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim - -LABEL author="Manuel Dielacher" maintainer="th3dilli@gmx.at" - -LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" -LABEL org.opencontainers.image.licenses=MIT - -RUN dpkg --add-architecture i386 \ - && apt update && apt upgrade -y \ - && apt install -y lib32gcc-s1 lib32stdc++6 libstdc++5:i386 locales \ - && update-locale lang=en_US.UTF-8 \ - && dpkg-reconfigure --frontend noninteractive locales \ - && useradd -m -d /home/container -s /bin/bash container - -USER container -ENV USER=container HOME=/home/container -ENV DEBIAN_FRONTEND noninteractive - -WORKDIR /home/container - -COPY ./entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/games/mohaa/entrypoint.sh b/games/mohaa/entrypoint.sh deleted file mode 100644 index 7fecb8b..0000000 --- a/games/mohaa/entrypoint.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# -# 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;exit}') -export INTERNAL_IP - -# Switch to the container's working directory -cd /home/container || exit 1 - -# 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 -)") - -# 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 -exec env ${PARSED} From de54edec3b3aa64d02b4c7f8a6fbfa398f56ed63 Mon Sep 17 00:00:00 2001 From: Th3Dilli Date: Wed, 15 Dec 2021 20:10:44 +0100 Subject: [PATCH 05/10] add mohaa deps --- oses/debian/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oses/debian/Dockerfile b/oses/debian/Dockerfile index 68978fe..d6c866e 100644 --- a/oses/debian/Dockerfile +++ b/oses/debian/Dockerfile @@ -18,7 +18,7 @@ RUN apt update \ ## install dependencies RUN apt install -y gcc g++ libgcc1 lib32gcc1 libc++-dev gdb libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \ libfontconfig libicu63 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadbclient-dev libduktape203 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates tzdata \ - liblua5.3 libz-dev rapidjson-dev + liblua5.3 libz-dev rapidjson-dev lib32stdc++6 libstdc++5:i386 ## configure locale RUN update-locale lang=en_US.UTF-8 \ From 9b2a7384bd1094dd86773824b5061cce754ea4c9 Mon Sep 17 00:00:00 2001 From: Th3Dilli Date: Sun, 13 Mar 2022 11:57:42 +0100 Subject: [PATCH 06/10] add mohaa image based on debian --- .github/workflows/games.yml | 3 ++- games/mohaa/Dockerfile | 12 ++++++++++++ games/mohaa/entrypoint.sh | 12 ++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 games/mohaa/Dockerfile create mode 100644 games/mohaa/entrypoint.sh diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml index 2a84791..246e2ed 100644 --- a/.github/workflows/games.yml +++ b/.github/workflows/games.yml @@ -19,6 +19,7 @@ jobs: - altv - arma3 - source + - mohaa steps: - uses: actions/checkout@v2 - uses: docker/setup-buildx-action@v1 @@ -37,4 +38,4 @@ jobs: platforms: linux/amd64 push: true tags: | - ghcr.io/parkervcp/games:${{ matrix.game }} + ghcr.io/parkervcp/games:${{ matrix.game }} diff --git a/games/mohaa/Dockerfile b/games/mohaa/Dockerfile new file mode 100644 index 0000000..353d28e --- /dev/null +++ b/games/mohaa/Dockerfile @@ -0,0 +1,12 @@ +FROM ghcr.io/parkervcp/yolks:debian + +LABEL author="Manuel Dielacher" maintainer="th3dilli@gmx.at" + +LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN dpkg --add-architecture i386 \ + && apt update && apt upgrade -y \ + && apt install -y lib32gcc-s1 lib32stdc++6 libstdc++5:i386 + + diff --git a/games/mohaa/entrypoint.sh b/games/mohaa/entrypoint.sh new file mode 100644 index 0000000..13d9e20 --- /dev/null +++ b/games/mohaa/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} From 3c8acf91ce7a42e8926342c4855497f668f76a7e Mon Sep 17 00:00:00 2001 From: Th3Dilli Date: Sun, 13 Mar 2022 12:12:01 +0100 Subject: [PATCH 07/10] add image to readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9d54cf5..32fe62b 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,8 @@ is tagged correctly. * `ghcr.io/parkervcp/games:arma3` * [`source`](/games/source) * `ghcr.io/parkervcp/games:source` +* [`mohaa`](games/mohaa) + * `ghcr.io/pterodactyl/games:mohaa` ### [Golang](/go) From d268ce3f5a794f8ea113dd57619210dfd1322a1d Mon Sep 17 00:00:00 2001 From: Th3Dilli Date: Sun, 13 Mar 2022 12:16:30 +0100 Subject: [PATCH 08/10] rm debian changes --- oses/debian/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oses/debian/Dockerfile b/oses/debian/Dockerfile index d1c5293..e7a48ba 100644 --- a/oses/debian/Dockerfile +++ b/oses/debian/Dockerfile @@ -20,7 +20,7 @@ RUN apt update \ ## Install dependencies RUN apt install -y gcc g++ libgcc1 libc++-dev gdb libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \ libfontconfig libicu67 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadbclient-dev-compat libduktape205 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates \ - liblua5.3-0 libz-dev rapidjson-dev tzdata libevent-dev libzip4 lib32stdc++6 libstdc++5:i386 + liblua5.3-0 libz-dev rapidjson-dev tzdata libevent-dev libzip4 ## Configure locale RUN update-locale lang=en_US.UTF-8 \ From ad792dc52157a95ea096e7df824a520c6ac2fdad Mon Sep 17 00:00:00 2001 From: Th3Dilli Date: Fri, 13 May 2022 21:14:43 +0200 Subject: [PATCH 09/10] fix alphabetical order --- .github/workflows/games.yml | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml index 246e2ed..0dc24d1 100644 --- a/.github/workflows/games.yml +++ b/.github/workflows/games.yml @@ -18,8 +18,8 @@ jobs: game: - altv - arma3 - - source - mohaa + - source steps: - uses: actions/checkout@v2 - uses: docker/setup-buildx-action@v1 diff --git a/README.md b/README.md index 32fe62b..65d0fbb 100644 --- a/README.md +++ b/README.md @@ -79,10 +79,10 @@ is tagged correctly. * `ghcr.io/parkervcp/games:altv` * [`arma3`](/games/arma3) * `ghcr.io/parkervcp/games:arma3` -* [`source`](/games/source) - * `ghcr.io/parkervcp/games:source` * [`mohaa`](games/mohaa) * `ghcr.io/pterodactyl/games:mohaa` +* [`source`](/games/source) + * `ghcr.io/parkervcp/games:source` ### [Golang](/go) From 8fed9ba30679e1fd73b7759a674525a30d05de9b Mon Sep 17 00:00:00 2001 From: Th3Dilli Date: Fri, 13 May 2022 21:15:33 +0200 Subject: [PATCH 10/10] apply INTERNAL_IP fix --- games/mohaa/entrypoint.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/games/mohaa/entrypoint.sh b/games/mohaa/entrypoint.sh index 13d9e20..11acd70 100644 --- a/games/mohaa/entrypoint.sh +++ b/games/mohaa/entrypoint.sh @@ -1,8 +1,9 @@ #!/bin/bash cd /home/container -# Make internal Docker IP address available to processes. -export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` +# Set environment variable that holds the Internal Docker IP +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP # Replace Startup Variables MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')