diff --git a/README.md b/README.md index 866e28f..4147f44 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,14 @@ is tagged correctly. * [`dart2.17`](/dart/2.17) * `ghcr.io/darksaid98/yolks:dart_2.17` +* [`dart2.18`](/dart/2.18) + * `ghcr.io/darksaid98/yolks:dart_2.18` +* [`dart2.19`](/dart/2.19) + * `ghcr.io/darksaid98/yolks:dart_2.19` +* [`dart3.3`](/dart/3.3) + * `ghcr.io/darksaid98/yolks:dart_3.3` +* [`dart stable`](/dart/stable) + * `ghcr.io/darksaid98/yolks:dart_stable` ### [dotNet](/dotnet) @@ -123,13 +131,17 @@ is tagged correctly. * [`minetest`](/games/minetest) * `ghcr.io/darksaid98/games:minetest` * [`mohaa`](games/mohaa) - * `ghcr.io/pterodactyl/games:mohaa` + * `ghcr.io/darksaid98/games:mohaa` * [`Multi Theft Auto: San Andreas`](games/mta) - * `ghcr.io/pterodactyl/games:mta` + * `ghcr.io/darksaid98/games:mta` +* [`Rust (dedicated server)`](games/rust) + * `ghcr.io/darksaid98/games:rust` * [`samp`](/games/samp) * `ghcr.io/darksaid98/games:samp` * [`source`](/games/source) * `ghcr.io/darksaid98/games:source` +* [`thebattleforwesnoth`](/games/thebattleforwesnoth) + * `ghcr.io/darksaid98/games:thebattleforwesnoth` * [`valheim`](/games/valheim) * `ghcr.io/darksaid98/games:valheim` @@ -151,6 +163,8 @@ is tagged correctly. * `ghcr.io/darksaid98/yolks:go_1.20` * [`go1.21`](/go/1.21) * `ghcr.io/darksaid98/yolks:go_1.21` +* [`go1.22`](/go/1.22) + * `ghcr.io/darksaid98/yolks:go_1.22` ### [Java](/java) @@ -164,6 +178,8 @@ is tagged correctly. * `ghcr.io/darksaid98/yolks:java_17` * [`java19`](/java/19) * `ghcr.io/darksaid98/yolks:java_19` +* [`java21`](/java/21) + * `ghcr.io/darksaid98/yolks:java_21` ### [MariaDB](/mariadb) @@ -177,6 +193,12 @@ is tagged correctly. * `ghcr.io/darksaid98/yolks:mariadb_10.6` * [`MariaDB 10.7`](/mariadb/10.7) * `ghcr.io/darksaid98/yolks:mariadb_10.7` + * [`MariaDB 11.2`](/mariadb/11.2) + * `ghcr.io/darksaid98/yolks:mariadb_11.2` + * [`MariaDB 11.3`](/mariadb/11.3) + * `ghcr.io/darksaid98/yolks:mariadb_11.3` + * [`MariaDB 11.4`](/mariadb/11.4) + * `ghcr.io/darksaid98/yolks:mariadb_11.4` ### [MongoDB](/mongodb) @@ -186,6 +208,8 @@ is tagged correctly. * `ghcr.io/darksaid98/yolks:mongodb_5` * [`MongoDB 6`](/mongodb/6) * `ghcr.io/darksaid98/yolks:mongodb_6` + * [`MongoDB 7`](/mongodb/7) + * `ghcr.io/darksaid98/yolks:mongodb_7` ### [Mono](/mono) @@ -208,8 +232,11 @@ is tagged correctly. * `ghcr.io/darksaid98/yolks:nodejs_19` * [`node20`](/nodejs/20) * `ghcr.io/darksaid98/yolks:nodejs_20` - - +* [`node21`](/nodejs/21) + * `ghcr.io/darksaid98/yolks:nodejs_21` +* [`node23`](/nodejs/23) + * `ghcr.io/darksaid98/yolks:nodejs_23` + ### [PostgreSQL](/postgres) * [`Postgres 9`](/postgres/9) @@ -265,6 +292,10 @@ is tagged correctly. * `ghcr.io/darksaid98/steamcmd:dotnet` * [`SteamCMD Proton`](/steamcmd/proton) * `ghcr.io/darksaid98/steamcmd:proton` +* [`SteamCMD Proton`](/steamcmd/proton_8) + * `ghcr.io/darksaid98/steamcmd:proton_8` +* [`SteamCMD Sniper latest`](/steamcmd/sniper) + * `ghcr.io/darksaid98/steamcmd:sniper` * [`SteamCMD Ubuntu latest LTS`](/steamcmd/ubuntu) * `ghcr.io/darksaid98/steamcmd:ubuntu` diff --git a/apps/uptimekuma/Dockerfile b/apps/uptimekuma/Dockerfile index 1f8b17b..2fd2a39 100644 --- a/apps/uptimekuma/Dockerfile +++ b/apps/uptimekuma/Dockerfile @@ -23,9 +23,13 @@ RUN apk add --no-cache \ iproute2 \ iputils-ping \ libtool \ + musl \ + musl-utils \ + musl-locales \ python3 \ python3-dev \ py3-pip \ + pipx \ sqlite \ tzdata \ zip \ @@ -42,7 +46,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=amd64; e RUN chmod +x /usr/bin/cloudflared # install apprise -RUN pip install apprise +RUN pipx install apprise ## Setup user and working directory RUN adduser -D -h /home/container container -s /bin/bash container diff --git a/apps/uptimekuma/entrypoint.sh b/apps/uptimekuma/entrypoint.sh index e529b3a..7120b8e 100644 --- a/apps/uptimekuma/entrypoint.sh +++ b/apps/uptimekuma/entrypoint.sh @@ -31,6 +31,8 @@ echo -e "${YELLOW}NodeJS Version: ${RED} $(node -v) ${NC}" echo -e "${YELLOW}Cloudflared Version: ${RED} $(/usr/bin/cloudflared --version) ${NC}" echo -e "${BLUE}-------------------------------------------------${NC}" +export PATH=$PATH:/root/.local/bin + # Replace Startup Variables MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') echo ":/home/container$ ${MODIFIED_STARTUP}" diff --git a/bot/bastion/Dockerfile b/bot/bastion/Dockerfile index ed858fa..b1a7a6f 100644 --- a/bot/bastion/Dockerfile +++ b/bot/bastion/Dockerfile @@ -1,12 +1,12 @@ -FROM --platform=$TARGETOS/$TARGETARCH mongo:6-focal +FROM --platform=$TARGETOS/$TARGETARCH mongo:7-jammy LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" -## install nodejs 18 -RUN apt update && apt install --no-install-recommends -y curl \ - && mkdir -p /etc/apt/keyrings \ - && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ - && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ +## install nodejs 20 +RUN apt update && apt install --no-install-recommends -y curl apt-transport-https ca-certificates gnupg \ + && mkdir -p /usr/share/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg \ + && echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ && apt update && apt install -y nodejs \ && npm install -g npm@latest \ ## install bastion reqs diff --git a/bot/parkertron/Dockerfile b/bot/parkertron/Dockerfile index 871fe67..c1cc297 100644 --- a/bot/parkertron/Dockerfile +++ b/bot/parkertron/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/bot/red/Dockerfile b/bot/red/Dockerfile index f66d861..8e1b834 100644 --- a/bot/red/Dockerfile +++ b/bot/red/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH python:3.11-slim +FROM --platform=$TARGETOS/$TARGETARCH python:3.11-slim-bookworm LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" @@ -34,7 +34,7 @@ RUN apt update \ liblzma-dev \ ffmpeg \ imagemagick \ - tini + tini RUN pip install --upgrade pip RUN pip install python-forecastio tweepy unidecode mcstatus bs4 sqlalchemy geocoder valve python-valve py-cpuinfo psutil diff --git a/bot/sinusbot/Dockerfile b/bot/sinusbot/Dockerfile index 388b34d..bba2c0c 100644 --- a/bot/sinusbot/Dockerfile +++ b/bot/sinusbot/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim LABEL org.opencontainers.image.authors="i2007@damw.eu" LABEL version="1.0" @@ -8,11 +8,11 @@ ENV DEBIAN_FRONTEND noninteractive # Install Dependencies RUN apt update \ && apt upgrade -y \ - && apt install -y ca-certificates less locales pulseaudio python python3 sudo x11vnc x11-xkb-utils xvfb iproute2 ffmpeg curl liblcms2-2 libatomic1 libxcb-xinerama0 fontconfig \ - libasound2 libegl1-mesa libglib2.0-0 libnss3 libpci3 libpulse0 libxcursor1 libxslt1.1 libx11-xcb1 libxkbcommon0 bzip2 libxss1 libxcomposite1 libevent-2.1-7 libxcb-icccm4 \ - libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1 libxkbcommon-x11-0 tini \ + && apt install -y ca-certificates less locales pulseaudio python3 python3-pip sudo x11vnc x11-xkb-utils xvfb iproute2 ffmpeg curl liblcms2-2 libatomic1 libxcb-xinerama0 \ + fontconfig libasound2 libegl1-mesa libglib2.0-0 libnss3 libpci3 libpulse0 libxcursor1 libxslt1.1 libx11-xcb1 libxkbcommon0 bzip2 libxss1 libxcomposite1 libevent-2.1-7 \ + libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1 libxkbcommon-x11-0 tini \ && useradd -m -d /home/container container - +#RUN python3 -m pip install requests ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8 @@ -26,4 +26,4 @@ STOPSIGNAL SIGINT COPY --chown=container:container ./entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT ["/usr/bin/tini", "-g", "--"] -CMD ["/entrypoint.sh"] \ No newline at end of file +CMD ["/entrypoint.sh"] diff --git a/bot/sinusbot/entrypoint.sh b/bot/sinusbot/entrypoint.sh index d0aea75..057d59a 100644 --- a/bot/sinusbot/entrypoint.sh +++ b/bot/sinusbot/entrypoint.sh @@ -5,6 +5,7 @@ cd /home/container INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') export INTERNAL_IP + # Replace Startup Variables MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` echo ":/home/container$ ${MODIFIED_STARTUP}" diff --git a/box64/Dockerfile b/box64/Dockerfile index e6f4872..d0ae99e 100644 --- a/box64/Dockerfile +++ b/box64/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim LABEL author="QuintenQVD" maintainer="josdekurk@gmail.com" @@ -10,8 +10,8 @@ RUN apt update \ ## Install dependencies RUN apt install -y libc++-dev libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools 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 \ - libz-dev rapidjson-dev tzdata libevent-dev libzip4 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 build-essential cmake libgdiplus libstdc++6 + libfontconfig libicu72 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadb-dev libmariadb-dev-compat libduktape207 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates \ + libz3-dev rapidjson-dev tzdata libevent-dev libzip4 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 build-essential cmake libgdiplus libstdc++6 ## Configure locale RUN update-locale lang=en_US.UTF-8 \ diff --git a/cassandra/entrypoint.sh b/cassandra/entrypoint.sh index 2541719..b91ad64 100644 --- a/cassandra/entrypoint.sh +++ b/cassandra/entrypoint.sh @@ -12,27 +12,27 @@ export INTERNAL_IP cd /home/container || exit 1 # Print Java version -printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mjava -version\n" +printf "\033[1m\033[33mcontainer@pelican~ \033[0mjava -version\n" java -version # Print Python version if command -v python &> /dev/null then - printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mpython --version\n" + printf "\033[1m\033[33mcontainer@pelican~ \033[0mpython --version\n" python --version else - printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mpython3 --version\n" + printf "\033[1m\033[33mcontainer@pelican~ \033[0mpython3 --version\n" python3 --version fi # 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 -)") +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') -# 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" +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer@pelican~ \033[0m" +echo "$PARSED" # shellcheck disable=SC2086 -exec env ${PARSED} +eval "$PARSED" diff --git a/dart/3.3/Dockerfile b/dart/3.3/Dockerfile new file mode 100644 index 0000000..a4c6b30 --- /dev/null +++ b/dart/3.3/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH dart:3.3 + +LABEL author="Alden Bansemer" maintainer="alden@knoban.com" + +RUN apt update \ + && apt -y install iproute2 git ca-certificates tzdata tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dart/stable/Dockerfile b/dart/stable/Dockerfile new file mode 100644 index 0000000..f8150d4 --- /dev/null +++ b/dart/stable/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH dart:stable + +LABEL author="Alden Bansemer" maintainer="alden@knoban.com" + +RUN apt update \ + && apt -y install iproute2 git ca-certificates tzdata tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dotnet/entrypoint.sh b/dotnet/entrypoint.sh index b9fd77c..d072407 100644 --- a/dotnet/entrypoint.sh +++ b/dotnet/entrypoint.sh @@ -9,7 +9,7 @@ export INTERNAL_IP export DOTNET_ROOT=/usr/share/ # print the dotnet version on startup -printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mdotnet --version\n" +printf "\033[1m\033[33mcontainer@pelican~ \033[0mdotnet --version\n" dotnet --version # Replace Startup Variables diff --git a/erlang/entrypoint.sh b/erlang/entrypoint.sh index 7511c57..b657169 100644 --- a/erlang/entrypoint.sh +++ b/erlang/entrypoint.sh @@ -10,16 +10,16 @@ export INTERNAL_IP cd /home/container || exit 1 # Print Erlang's version -printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0merl -noshell -eval 'erlang:display(erlang:system_info(system_version))' -eval 'init:stop()'\n" +printf "\033[1m\033[33mcontainer@pelican~ \033[0merl -noshell -eval 'erlang:display(erlang:system_info(system_version))' -eval 'init:stop()'\n" erl -noshell -eval 'erlang:display(erlang:system_info(system_version))' -eval 'init:stop()' # 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 -)") +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') -# 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" +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer@pelican~ \033[0m" +echo "$PARSED" # shellcheck disable=SC2086 -exec env ${PARSED} +eval "$PARSED" diff --git a/games/altv/Dockerfile b/games/altv/Dockerfile index cd13464..0422fae 100644 --- a/games/altv/Dockerfile +++ b/games/altv/Dockerfile @@ -1,7 +1,7 @@ # ---------------------------------- # Environment: debian # ---------------------------------- -FROM --platform=$TARGETOS/$TARGETARCH node:16-bullseye +FROM --platform=$TARGETOS/$TARGETARCH node:16-bookworm LABEL author="goover" maintainer="info@goover.de" @@ -11,14 +11,14 @@ RUN useradd -m -d /home/container -s /bin/bash container RUN apt update -y \ && apt upgrade -y \ - && apt install -y g++ gcc libgcc-s1 lib32gcc-s1 gdb libstdc++6 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 \ - libfontconfig1 libicu67 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadb-dev libduktape205 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates tzdata \ + && apt install -y g++ gcc libgcc-s1 lib32gcc-s1 gdb libstdc++6 libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat-traditional telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \ + libfontconfig1 libicu72 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadb-dev libduktape207 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates tzdata libgdiplus\ python3 dnsutils build-essential coreutils jq pcregrep tini -RUN wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ +RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ && dpkg -i packages-microsoft-prod.deb \ && apt update -y \ - && apt install -y dotnet-sdk-5.0 dotnet-sdk-6.0 dotnet-sdk-7.0 libgdiplus + && apt install -y dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 libgdiplus RUN update-locale lang=en_US.UTF-8 \ && dpkg-reconfigure --frontend noninteractive locales diff --git a/games/arma3/Dockerfile b/games/arma3/Dockerfile index 49dc452..169cba1 100644 --- a/games/arma3/Dockerfile +++ b/games/arma3/Dockerfile @@ -1,6 +1,6 @@ FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim -LABEL author="David Wolfe (Red-Thirten)" maintainer="rehlmgaming@gmail.com" +LABEL author="David Wolfe (Red-Thirten)" maintainer="red_thirten@yahoo.com" LABEL org.opencontainers.image.source="https://github.com/darksaid98/yolks" LABEL org.opencontainers.image.licenses=MIT @@ -28,7 +28,8 @@ RUN dpkg --add-architecture i386 \ libnss-wrapper \ libnss-wrapper:i386 \ libtbb2 \ - libtbb2:i386 + libtbb2:i386 \ + tini ## Configure locale RUN update-locale lang=en_US.UTF-8 \ @@ -47,6 +48,11 @@ USER container ENV USER=container HOME=/home/container WORKDIR /home/container -## Copy over and execute entrypoint.sh -COPY ./entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] +## Copy over entrypoint.sh and set permissions +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +## Start with Tini to pass future stop signals correctly +STOPSIGNAL SIGINT +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/games/arma3/entrypoint.sh b/games/arma3/entrypoint.sh index d6a2676..e0df723 100644 --- a/games/arma3/entrypoint.sh +++ b/games/arma3/entrypoint.sh @@ -346,6 +346,12 @@ if [[ ${MODS_LOWERCASE} == "1" ]]; then done fi +# Define the log file path with a timestamp +LOG_FILE="/home/container/serverprofile/rpt/arma3server_$(date '+%m_%d_%Y_%H%M%S').rpt" + +# Ensure the logs directory exists +mkdir -p /home/container/serverprofile/rpt + # Clear HC cache, if specified if [[ ${CLEAR_CACHE} == "1" ]]; then echo -e "\n${GREEN}[STARTUP]: ${CYAN}Clearing Headless Client profiles cache...${NC}" @@ -395,7 +401,11 @@ fi # Start the Server echo -e "\n${GREEN}[STARTUP]:${NC} Starting server with the following startup command:" echo -e "${CYAN}${modifiedStartup}${NC}\n" -${modifiedStartup} +if [[ "$STARTUP_PARAMS" == *"-noLogs"* ]]; then + ${modifiedStartup} +else + ${modifiedStartup} 2>&1 | tee -a "$LOG_FILE" +fi if [ $? -ne 0 ]; then echo -e "\n${RED}PTDL_CONTAINER_ERR: There was an error while attempting to run the start command.${NC}\n" diff --git a/games/dayz/entrypoint.sh b/games/dayz/entrypoint.sh index c2367f0..889e6c2 100644 --- a/games/dayz/entrypoint.sh +++ b/games/dayz/entrypoint.sh @@ -1,15 +1,16 @@ #!/bin/bash -## File: Pterodactyl DayZ SA Image - entrypoint.sh +## File: DayZ Image - entrypoint.sh ## Author: David Wolfe (Red-Thirten) ## Contributors: Aussie Server Hosts (https://aussieserverhosts.com/) -## Date: 2022/11/27 +## Date: 2024/06/05 ## License: MIT License ## === CONSTANTS === STEAMCMD_DIR="./steamcmd" # SteamCMD's directory containing steamcmd.sh +WORKSHOP_DIR="./Steam/steamapps/workshop" # SteamCMD's directory containing workshop downloads STEAMCMD_LOG="${STEAMCMD_DIR}/steamcmd.log" # Log file for SteamCMD -GAME_ID=221100 # SteamCMD ID for the DayZ SA GAME (not server). Only used for Workshop mod downloads. +GAME_ID=221100 # SteamCMD ID for the DayZ GAME (not server). Only used for Workshop mod downloads. # Color Codes CYAN='\033[0;36m' @@ -45,9 +46,9 @@ function RunSteamCMD { #[Input: int server=0 mod=1; int id] # Check if updating server or mod if [[ $1 == 0 ]]; then # Server - numactl --physcpubind=+0 ${STEAMCMD_DIR}/steamcmd.sh +force_install_dir /home/container "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +app_update $2 $extraFlags $validateServer +quit | tee -a "${STEAMCMD_LOG}" + ${STEAMCMD_DIR}/steamcmd.sh +force_install_dir /home/container "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +app_update $2 $extraFlags $validateServer +quit | tee -a "${STEAMCMD_LOG}" else # Mod - numactl --physcpubind=+0 ${STEAMCMD_DIR}/steamcmd.sh "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +workshop_download_item $GAME_ID $2 +quit | tee -a "${STEAMCMD_LOG}" + ${STEAMCMD_DIR}/steamcmd.sh "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +workshop_download_item $GAME_ID $2 +quit | tee -a "${STEAMCMD_LOG}" fi # Error checking for SteamCMD @@ -104,8 +105,8 @@ function RunSteamCMD { #[Input: int server=0 mod=1; int id] # Move the downloaded mod to the root directory, and replace existing mod if needed mkdir -p ./@$2 rm -rf ./@$2/* - mv -f ./Steam/steamapps/workshop/content/$GAME_ID/$2/* ./@$2 - rm -d ./Steam/steamapps/workshop/content/$GAME_ID/$2 + mv -f ${WORKSHOP_DIR}/content/$GAME_ID/$2/* ./@$2 + rm -d ${WORKSHOP_DIR}/content/$GAME_ID/$2 # Make the mods contents all lowercase ModsLowercase @$2 # Move any .bikey's to the keys directory @@ -238,6 +239,11 @@ if [[ ${UPDATE_SERVER} == 1 ]]; then if [[ -n $latestUpdate ]] && [[ $latestUpdate =~ ^[0-9]+$ ]]; then # Notify last update date, if valid echo -e "\tMod was last updated: ${CYAN}$(date -d @${latestUpdate})${NC}" fi + + # Delete SteamCMD appworkshop cache before running to avoid mod download failures + echo -e "\tClearing SteamCMD appworkshop cache..." + rm -f ${WORKSHOP_DIR}/appworkshop_$GAME_ID.acf + echo -e "\tAttempting mod update/download via SteamCMD...\n" RunSteamCMD 1 $modID fi @@ -280,6 +286,6 @@ echo -e "${CYAN}${modifiedStartup}${NC}\n" ${modifiedStartup} if [ $? -ne 0 ]; then - echo -e "\n${RED}PTDL_CONTAINER_ERR: There was an error while attempting to run the start command.${NC}\n" + echo -e "\n${RED}[STARTUP_ERR]: There was an error while attempting to run the start command.${NC}\n" exit 1 fi diff --git a/games/minetest/Dockerfile b/games/minetest/Dockerfile index d822314..50ead4a 100644 --- a/games/minetest/Dockerfile +++ b/games/minetest/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH ubuntu:20.04 +FROM --platform=$TARGETOS/$TARGETARCH ubuntu:22.04 ENV DEBIAN_FRONTEND noninteractive RUN apt update -y \ diff --git a/games/minetest/entrypoint.sh b/games/minetest/entrypoint.sh index 399eb5a..505b263 100644 --- a/games/minetest/entrypoint.sh +++ b/games/minetest/entrypoint.sh @@ -12,7 +12,7 @@ export INTERNAL_IP cd /home/container || exit 1 # Print minetest version -printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mminetest --version\n" +printf "\033[1m\033[33mcontainer@pelican~ \033[0mminetest --version\n" minetest --version # Replace Startup Variables diff --git a/games/rust/Dockerfile b/games/rust/Dockerfile new file mode 100644 index 0000000..540f444 --- /dev/null +++ b/games/rust/Dockerfile @@ -0,0 +1,21 @@ +FROM --platform=$TARGETOS/$TARGETARCH node:18-slim + +ENV DEBIAN_FRONTEND=noninteractive + +RUN dpkg --add-architecture i386 \ + && apt update \ + && apt upgrade -y \ + && apt install -y lib32gcc-s1 lib32stdc++6 unzip curl iproute2 tzdata libgdiplus libsdl2-2.0-0:i386 \ + && mkdir /wrapper \ + && npm install --prefix /wrapper ws \ + && useradd -d /home/container -m container + +USER container +ENV USER=container HOME=/home/container + +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +COPY ./wrapper.js /wrapper/wrapper.js + +CMD [ "/bin/bash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/games/rust/entrypoint.sh b/games/rust/entrypoint.sh new file mode 100644 index 0000000..03b51fb --- /dev/null +++ b/games/rust/entrypoint.sh @@ -0,0 +1,48 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +export INTERNAL_IP=`ip route get 1 | awk '{print $(NF-2);exit}'` + +## if auto_update is not set or to 1 update +if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then + # Allow for the staging branch to also update itself + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login anonymous +app_update 258550 $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) +quit +else + echo -e "Not updating game server as auto update was set to 0. Starting Server" +fi + +# Replace Startup Variables +MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo ":/home/container$ ${MODIFIED_STARTUP}" + +if [[ "${FRAMEWORK}" == "carbon" ]]; then + # Carbon: https://github.com/CarbonCommunity/Carbon.Core + echo "Updating Carbon..." + curl -sSL "https://github.com/CarbonCommunity/Carbon.Core/releases/download/production_build/Carbon.Linux.Release.tar.gz" | tar zx + echo "Done updating Carbon!" + + export DOORSTOP_ENABLED=1 + export DOORSTOP_TARGET_ASSEMBLY="$(pwd)/carbon/managed/Carbon.Preloader.dll" + MODIFIED_STARTUP="LD_PRELOAD=$(pwd)/libdoorstop.so ${MODIFIED_STARTUP}" +elif [[ "${FRAMEWORK}" == "oxide-staging" ]]; then + echo "updating oxide-staging" + curl -sSL -o oxide-staging.zip "https://downloads.oxidemod.com/artifacts/Oxide.Rust/staging/Oxide.Rust-linux.zip" + unzip -o -q oxide-staging.zip + rm oxide-staging.zip + echo "Done updating oxide Staging" +elif [[ "$OXIDE" == "1" ]] || [[ "${FRAMEWORK}" == "oxide" ]]; then + # Oxide: https://github.com/OxideMod/Oxide.Rust + echo "Updating uMod..." + curl -sSL "https://github.com/OxideMod/Oxide.Rust/releases/latest/download/Oxide.Rust-linux.zip" > umod.zip + unzip -o -q umod.zip + rm umod.zip + echo "Done updating uMod!" +# else Vanilla, do nothing +fi + +# Fix for Rust not starting +export LD_LIBRARY_PATH=$(pwd)/RustDedicated_Data/Plugins/x86_64:$(pwd) + +# Run the Server +/wrapper/wrapper.js "${MODIFIED_STARTUP}" \ No newline at end of file diff --git a/games/rust/wrapper.js b/games/rust/wrapper.js new file mode 100755 index 0000000..f4f6cc5 --- /dev/null +++ b/games/rust/wrapper.js @@ -0,0 +1,140 @@ +#!/usr/bin/env node + +var startupCmd = ""; +const fs = require("fs"); +fs.writeFile("latest.log", "", (err) => { + if (err) console.log("Callback error in appendFile:" + err); +}); + +var args = process.argv.splice(process.execArgv.length + 2); +for (var i = 0; i < args.length; i++) { + if (i === args.length - 1) { + startupCmd += args[i]; + } else { + startupCmd += args[i] + " "; + } +} + +if (startupCmd.length < 1) { + console.log("Error: Please specify a startup command."); + process.exit(); +} + +const seenPercentage = {}; + +function filter(data) { + const str = data.toString(); + if (str.startsWith("Loading Prefab Bundle ")) { // Rust seems to spam the same percentage, so filter out any duplicates. + const percentage = str.substr("Loading Prefab Bundle ".length); + if (seenPercentage[percentage]) return; + + seenPercentage[percentage] = true; + } + + console.log(str); +} + +var exec = require("child_process").exec; +console.log("Starting Rust..."); + +var exited = false; +const gameProcess = exec(startupCmd); +gameProcess.stdout.on('data', filter); +gameProcess.stderr.on('data', filter); +gameProcess.on('exit', function (code, signal) { + exited = true; + + if (code) { + console.log("Main game process exited with code " + code); + // process.exit(code); + } +}); + +function initialListener(data) { + const command = data.toString().trim(); + if (command === 'quit') { + gameProcess.kill('SIGTERM'); + } else { + console.log('Unable to run "' + command + '" due to RCON not being connected yet.'); + } +} +process.stdin.resume(); +process.stdin.setEncoding("utf8"); +process.stdin.on('data', initialListener); + +process.on('exit', function (code) { + if (exited) return; + + console.log("Received request to stop the process, stopping the game..."); + gameProcess.kill('SIGTERM'); +}); + +var waiting = true; +var poll = function () { + function createPacket(command) { + var packet = { + Identifier: -1, + Message: command, + Name: "WebRcon" + }; + return JSON.stringify(packet); + } + + var serverHostname = process.env.RCON_IP ? process.env.RCON_IP : "localhost"; + var serverPort = process.env.RCON_PORT; + var serverPassword = process.env.RCON_PASS; + var WebSocket = require("ws"); + var ws = new WebSocket("ws://" + serverHostname + ":" + serverPort + "/" + serverPassword); + + ws.on("open", function open() { + console.log("Connected to RCON. Generating the map now. Please wait until the server status switches to \"Running\"."); + waiting = false; + + // Hack to fix broken console output + ws.send(createPacket('status')); + + process.stdin.removeListener('data', initialListener); + gameProcess.stdout.removeListener('data', filter); + gameProcess.stderr.removeListener('data', filter); + process.stdin.on('data', function (text) { + ws.send(createPacket(text)); + }); + }); + + ws.on("message", function (data, flags) { + try { + var json = JSON.parse(data); + if (json !== undefined) { + if (json.Message !== undefined && json.Message.length > 0) { + console.log(json.Message); + const fs = require("fs"); + fs.appendFile("latest.log", "\n" + json.Message, (err) => { + if (err) console.log("Callback error in appendFile:" + err); + }); + } + } else { + console.log("Error: Invalid JSON received"); + } + } catch (e) { + if (e) { + console.log(e); + } + } + }); + + ws.on("error", function (err) { + waiting = true; + console.log("Waiting for RCON to come up..."); + setTimeout(poll, 5000); + }); + + ws.on("close", function () { + if (!waiting) { + console.log("Connection to server closed."); + + exited = true; + process.exit(); + } + }); +} +poll(); \ No newline at end of file diff --git a/games/samp/Dockerfile b/games/samp/Dockerfile index 0371afe..ba6198a 100644 --- a/games/samp/Dockerfile +++ b/games/samp/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim LABEL author="QuintenQVD" maintainer="josdekurk@gmail.com" @@ -7,14 +7,20 @@ RUN apt update \ RUN dpkg --add-architecture i386 \ && apt update \ && apt upgrade -y \ - && apt install -y libstdc++6 lib32stdc++6 tar curl iproute2 openssl fontconfig dirmngr ca-certificates dnsutils tzdata zip tini \ - && apt install -y libtbb2:i386 libtbb-dev:i386 libicu-dev:i386 \ + && apt install -y libstdc++6 lib32stdc++6 tar wget curl iproute2 openssl fontconfig dirmngr ca-certificates dnsutils tzdata zip tini \ + && apt install -y libtbb12:i386 libtbb-dev:i386 libicu-dev:i386 \ && useradd -d /home/container -m container RUN mkdir -p /run/systemd && echo 'docker' > /run/systemd/container RUN rm -rf /var/lib/apt/lists/* - + # Temp fix for things that still need libssl1.1 32 bit +RUN if [ "$(uname -m)" = "x86_64" ]; then \ + wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_i386.deb && \ + dpkg -i libssl1.1_1.1.0g-2ubuntu4_i386.deb && \ + rm libssl1.1_1.1.0g-2ubuntu4_i386.deb; \ + fi + USER container ENV USER=container HOME=/home/container WORKDIR /home/container diff --git a/games/source/Dockerfile b/games/source/Dockerfile index a67e918..699770a 100644 --- a/games/source/Dockerfile +++ b/games/source/Dockerfile @@ -20,7 +20,7 @@ # SOFTWARE. # -FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" @@ -32,7 +32,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN dpkg --add-architecture i386 \ && apt update \ && apt upgrade -y \ - && apt install -y tar curl gcc g++ lib32gcc-s1 libgcc1 libcurl4-gnutls-dev:i386 libssl1.1:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat tzdata numactl tini \ + && apt install -y tar curl gcc g++ lib32gcc-s1 libgcc-11-dev libgcc-12-dev libcurl4-gnutls-dev:i386 libssl-dev:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat-traditional tzdata numactl wget tini \ && useradd -m -d /home/container container ## install rcon @@ -41,6 +41,13 @@ RUN cd /tmp/ \ && tar xvf rcon.tar.gz \ && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + # Temp fix for things that still need libssl1.1 +RUN if [ "$(uname -m)" = "x86_64" ]; then \ + wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \ + dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \ + rm libssl1.1_1.1.0g-2ubuntu4_amd64.deb; \ + fi + USER container ENV USER=container HOME=/home/container WORKDIR /home/container diff --git a/games/source/entrypoint.sh b/games/source/entrypoint.sh index 153b869..8562f11 100644 --- a/games/source/entrypoint.sh +++ b/games/source/entrypoint.sh @@ -53,9 +53,9 @@ if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then # Update Source Server if [ ! -z ${SRCDS_APPID} ]; then if [ "${STEAM_USER}" == "anonymous" ]; then - ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit else - numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit + numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit fi else echo -e "No appid set. Starting Server" diff --git a/games/thebattleforwesnoth/Dockerfile b/games/thebattleforwesnoth/Dockerfile new file mode 100644 index 0000000..d1c33ce --- /dev/null +++ b/games/thebattleforwesnoth/Dockerfile @@ -0,0 +1,25 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +## update base packages +RUN apt update && apt upgrade -y + +## install dependencies +RUN apt install -y gcc g++ libgcc1 libc++-dev gdb libc6 git tar zip unzip libssl-dev tini iproute2 \ + libboost-filesystem-dev libboost-iostreams-dev libboost-locale-dev libboost-random-dev libboost-regex-dev libboost-program-options-dev libboost-system-dev libboost-coroutine-dev libboost-graph-dev \ + libsdl2-dev libcurl4-openssl-dev libcairo2-dev libvorbis-dev libbz2-dev zlib1g-dev libssl-dev libcrypto++-dev openssl cmake libsdl2-image-dev libsdl2-mixer-dev libsdl-pango-dev + + +## add container user +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/games/thebattleforwesnoth/entrypoint.sh b/games/thebattleforwesnoth/entrypoint.sh new file mode 100644 index 0000000..461e6b9 --- /dev/null +++ b/games/thebattleforwesnoth/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +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') +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/games/valheim/entrypoint.sh b/games/valheim/entrypoint.sh index 7a4356b..9bfe451 100644 --- a/games/valheim/entrypoint.sh +++ b/games/valheim/entrypoint.sh @@ -21,7 +21,7 @@ fi if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then # Update Source Server if [ ! -z ${SRCDS_APPID} ]; then - ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit else echo -e "No appid set. Starting Server" fi diff --git a/go/1.22/Dockerfile b/go/1.22/Dockerfile new file mode 100644 index 0000000..0473172 --- /dev/null +++ b/go/1.22/Dockerfile @@ -0,0 +1,38 @@ +# +# 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. +# + +FROM --platform=$TARGETOS/$TARGETARCH golang:1.22-alpine + +LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" + +LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates tzdata \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/go/entrypoint.sh b/go/entrypoint.sh index 7adafec..5de2ba6 100644 --- a/go/entrypoint.sh +++ b/go/entrypoint.sh @@ -34,16 +34,16 @@ export INTERNAL_IP cd /home/container || exit 1 # Print Go version -printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mgo version\n" +printf "\033[1m\033[33mcontainer@pelican~ \033[0mgo version\n" go version # 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 -)") +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') -# 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" +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer@pelican~ \033[0m" +echo "$PARSED" # shellcheck disable=SC2086 -exec env ${PARSED} +eval "$PARSED" diff --git a/installers/debian/Dockerfile b/installers/debian/Dockerfile index 0452fce..a049f8e 100644 --- a/installers/debian/Dockerfile +++ b/installers/debian/Dockerfile @@ -20,7 +20,7 @@ # SOFTWARE. # -FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" diff --git a/installers/ubuntu/Dockerfile b/installers/ubuntu/Dockerfile index 658af3e..bcfa60b 100644 --- a/installers/ubuntu/Dockerfile +++ b/installers/ubuntu/Dockerfile @@ -20,7 +20,7 @@ # SOFTWARE. # -FROM --platform=$TARGETOS/$TARGETARCH ubuntu:focal +FROM --platform=$TARGETOS/$TARGETARCH ubuntu:jammy LABEL author="oliver194" maintainer="100048880+oliver194@users.noreply.github.com" diff --git a/java/11/Dockerfile b/java/11/Dockerfile index 9a69ba2..b78d582 100644 --- a/java/11/Dockerfile +++ b/java/11/Dockerfile @@ -18,7 +18,9 @@ RUN apt update -y \ tzdata \ iproute2 \ libfreetype6 \ - tini + tini \ + zip \ + unzip ## Setup user and working directory @@ -32,4 +34,4 @@ STOPSIGNAL SIGINT COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT ["/usr/bin/tini", "-g", "--"] -CMD ["/entrypoint.sh"] \ No newline at end of file +CMD ["/entrypoint.sh"] diff --git a/java/11j9/Dockerfile b/java/11j9/Dockerfile index d94a963..6098eb9 100644 --- a/java/11j9/Dockerfile +++ b/java/11j9/Dockerfile @@ -15,7 +15,9 @@ RUN apt update -y \ tzdata \ iproute2 \ libfreetype6 \ - tini + tini \ + zip \ + unzip ## Setup user and working directory RUN useradd -m -d /home/container -s /bin/bash container diff --git a/java/16/Dockerfile b/java/16/Dockerfile index 8be923f..139721e 100644 --- a/java/16/Dockerfile +++ b/java/16/Dockerfile @@ -18,7 +18,9 @@ RUN apt update -y \ tzdata \ iproute2 \ libfreetype6 \ - tini + tini \ + zip \ + unzip ## Setup user and working directory RUN useradd -m -d /home/container -s /bin/bash container diff --git a/java/16j9/Dockerfile b/java/16j9/Dockerfile index 580f883..e26b6d8 100644 --- a/java/16j9/Dockerfile +++ b/java/16j9/Dockerfile @@ -15,7 +15,9 @@ RUN apt update -y \ tzdata \ iproute2 \ libfreetype6 \ - tini + tini \ + zip \ + unzip ## Setup user and working directory RUN useradd -m -d /home/container -s /bin/bash container diff --git a/java/17/Dockerfile b/java/17/Dockerfile index f9406e2..baa9736 100644 --- a/java/17/Dockerfile +++ b/java/17/Dockerfile @@ -18,7 +18,9 @@ RUN apt update -y \ tzdata \ iproute2 \ libfreetype6 \ - tini + tini \ + zip \ + unzip ## Setup user and working directory RUN useradd -m -d /home/container -s /bin/bash container diff --git a/java/19/Dockerfile b/java/19/Dockerfile index ef9987a..9bb6016 100644 --- a/java/19/Dockerfile +++ b/java/19/Dockerfile @@ -18,7 +18,9 @@ RUN apt update -y \ tzdata \ iproute2 \ libfreetype6 \ - tini + tini \ + zip \ + unzip ## Setup user and working directory RUN useradd -m -d /home/container -s /bin/bash container diff --git a/java/21/Dockerfile b/java/21/Dockerfile index b690703..a0e4f26 100644 --- a/java/21/Dockerfile +++ b/java/21/Dockerfile @@ -18,7 +18,9 @@ RUN apt update -y \ tzdata \ iproute2 \ libfreetype6 \ - tini + tini \ + zip \ + unzip ## Setup user and working directory RUN useradd -m -d /home/container -s /bin/bash container diff --git a/java/8/Dockerfile b/java/8/Dockerfile index f4ac7d1..27eae9a 100644 --- a/java/8/Dockerfile +++ b/java/8/Dockerfile @@ -18,7 +18,9 @@ RUN apt update -y \ tzdata \ iproute2 \ libfreetype6 \ - tini + tini \ + zip \ + unzip ## Setup user and working directory RUN useradd -m -d /home/container -s /bin/bash container diff --git a/java/8j9/Dockerfile b/java/8j9/Dockerfile index 58ab2db..5843a20 100644 --- a/java/8j9/Dockerfile +++ b/java/8j9/Dockerfile @@ -15,7 +15,9 @@ RUN apt update -y \ tzdata \ iproute2 \ libfreetype6 \ - tini + tini \ + zip \ + unzip ## Setup user and working directory RUN useradd -m -d /home/container -s /bin/bash container diff --git a/java/entrypoint.sh b/java/entrypoint.sh index e92f3d3..23b662a 100755 --- a/java/entrypoint.sh +++ b/java/entrypoint.sh @@ -34,16 +34,16 @@ export INTERNAL_IP cd /home/container || exit 1 # Print Java version -printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mjava -version\n" +printf "\033[1m\033[33mcontainer@pelican~ \033[0mjava -version\n" java -version # 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 -)") +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') -# 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" +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer@pelican~ \033[0m" +echo "$PARSED" # shellcheck disable=SC2086 -eval ${PARSED} +eval "$PARSED" diff --git a/mariadb/11.2/Dockerfile b/mariadb/11.2/Dockerfile new file mode 100644 index 0000000..811ee7d --- /dev/null +++ b/mariadb/11.2/Dockerfile @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# MariaDB Image for Pterodactyl +# ----------------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mariadb:11.2 + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt update -y \ + && apt install -y netcat \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mariadb/11.3/Dockerfile b/mariadb/11.3/Dockerfile new file mode 100644 index 0000000..a2533c2 --- /dev/null +++ b/mariadb/11.3/Dockerfile @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# MariaDB Image for Pterodactyl +# ----------------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mariadb:11.3 + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt update -y \ + && apt install -y netcat \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mariadb/11.4/Dockerfile b/mariadb/11.4/Dockerfile new file mode 100644 index 0000000..4bb949e --- /dev/null +++ b/mariadb/11.4/Dockerfile @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# MariaDB Image for Pterodactyl +# ----------------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mariadb:11.4 + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt update -y \ + && apt install -y netcat-traditional \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mongodb/6/Dockerfile b/mongodb/6/Dockerfile index 97cb7eb..0e73bbe 100644 --- a/mongodb/6/Dockerfile +++ b/mongodb/6/Dockerfile @@ -1,7 +1,7 @@ # ---------------------------------- # Environment: MongoDB # ---------------------------------- -FROM --platform=$TARGETOS/$TARGETARCH mongo:6-focal +FROM --platform=$TARGETOS/$TARGETARCH mongo:6-jammy LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/mongodb/7/Dockerfile b/mongodb/7/Dockerfile new file mode 100644 index 0000000..7773d41 --- /dev/null +++ b/mongodb/7/Dockerfile @@ -0,0 +1,19 @@ +# ---------------------------------- +# Environment: MongoDB +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mongo:7-jammy + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt update -y \ + && apt install -y netcat iproute2 \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mono/entrypoint.sh b/mono/entrypoint.sh index 269293f..2700f19 100644 --- a/mono/entrypoint.sh +++ b/mono/entrypoint.sh @@ -30,9 +30,9 @@ if [ ! -z "${SRCDS_APPID}" ]; then # Update Source Server if [ ! -z ${SRCDS_APPID} ]; then if [ "${STEAM_USER}" == "anonymous" ]; then - ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit else - numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit + numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit fi else echo -e "No appid set. Starting Server" diff --git a/nodejs/12/Dockerfile b/nodejs/12/Dockerfile index e85daf7..348c9fd 100644 --- a/nodejs/12/Dockerfile +++ b/nodejs/12/Dockerfile @@ -12,7 +12,7 @@ USER container ENV USER=container HOME=/home/container WORKDIR /home/container -STOPSIGNAL SIGINT +STOPSIGNAL SIGINT COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh diff --git a/nodejs/14/Dockerfile b/nodejs/14/Dockerfile index fe2764d..c0d53ee 100644 --- a/nodejs/14/Dockerfile +++ b/nodejs/14/Dockerfile @@ -12,7 +12,7 @@ USER container ENV USER=container HOME=/home/container WORKDIR /home/container -STOPSIGNAL SIGINT +STOPSIGNAL SIGINT COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh diff --git a/nodejs/16/Dockerfile b/nodejs/16/Dockerfile index b5314a5..2b740bd 100644 --- a/nodejs/16/Dockerfile +++ b/nodejs/16/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH node:16-bullseye-slim +FROM --platform=$TARGETOS/$TARGETARCH node:16-bookworm-slim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/nodejs/18/Dockerfile b/nodejs/18/Dockerfile index db091e1..ee3e920 100644 --- a/nodejs/18/Dockerfile +++ b/nodejs/18/Dockerfile @@ -6,10 +6,12 @@ RUN apt update \ && apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip tar curl build-essential libtool iputils-ping libnss3 tini \ && useradd -m -d /home/container container -RUN npm install npm@latest typescript ts-node @types/node --location=global +RUN npm install npm@10.x.x typescript ts-node @types/node --location=global -RUN corepack enable \ - && corepack prepare pnpm@latest --activate +# install pnpm +RUN npm install -g corepack +RUN corepack enable +RUN corepack prepare pnpm@latest --activate USER container ENV USER=container HOME=/home/container diff --git a/nodejs/19/Dockerfile b/nodejs/19/Dockerfile index c8db16e..9444d2e 100644 --- a/nodejs/19/Dockerfile +++ b/nodejs/19/Dockerfile @@ -11,6 +11,11 @@ RUN npm install npm@latest typescript ts-node @types/node --location=glo RUN corepack enable \ && corepack prepare pnpm@latest --activate +# install pnpm +RUN npm install -g corepack +RUN corepack enable +RUN corepack prepare pnpm@latest --activate + USER container ENV USER=container HOME=/home/container WORKDIR /home/container diff --git a/nodejs/20/Dockerfile b/nodejs/20/Dockerfile index 67acb85..3617afb 100644 --- a/nodejs/20/Dockerfile +++ b/nodejs/20/Dockerfile @@ -8,8 +8,10 @@ RUN apt update \ RUN npm install npm@latest typescript ts-node @types/node --location=global -RUN corepack enable \ - && corepack prepare pnpm@latest --activate +# install pnpm +RUN npm install -g corepack +RUN corepack enable +RUN corepack prepare pnpm@latest --activate USER container ENV USER=container HOME=/home/container diff --git a/nodejs/21/Dockerfile b/nodejs/21/Dockerfile index 4c20d8c..fd28e79 100644 --- a/nodejs/21/Dockerfile +++ b/nodejs/21/Dockerfile @@ -6,10 +6,12 @@ RUN apt update \ && apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip tar curl build-essential libtool iputils-ping libnss3 tini \ && useradd -m -d /home/container container -RUN npm install npm@latest typescript ts-node @types/node --location=global +RUN npm install npm@10.x.x typescript ts-node @types/node --location=global -RUN corepack enable \ - && corepack prepare pnpm@latest --activate +# install pnpm +RUN npm install -g corepack +RUN corepack enable +RUN corepack prepare pnpm@latest --activate USER container ENV USER=container HOME=/home/container diff --git a/nodejs/23/Dockerfile b/nodejs/23/Dockerfile new file mode 100644 index 0000000..5cb4278 --- /dev/null +++ b/nodejs/23/Dockerfile @@ -0,0 +1,25 @@ +FROM --platform=$TARGETOS/$TARGETARCH node:23-bookworm-slim + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +RUN apt update \ + && apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip tar curl build-essential libtool iputils-ping libnss3 tini \ + && useradd -m -d /home/container container + +RUN npm install npm@latest typescript ts-node @types/node --location=global + +# install pnpm +RUN npm install -g corepack +RUN corepack enable +RUN corepack prepare pnpm@latest --activate + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/oses/alpine/entrypoint.sh b/oses/alpine/entrypoint.sh index e156de6..2b81022 100644 --- a/oses/alpine/entrypoint.sh +++ b/oses/alpine/entrypoint.sh @@ -34,11 +34,11 @@ 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 -)") +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') -# 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" +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer@pelican~ \033[0m" +echo "$PARSED" # shellcheck disable=SC2086 -exec env ${PARSED} +eval "$PARSED" diff --git a/oses/debian/Dockerfile b/oses/debian/Dockerfile index f47530b..39eb430 100644 --- a/oses/debian/Dockerfile +++ b/oses/debian/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" @@ -18,9 +18,24 @@ RUN apt update \ && apt upgrade -y ## 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 libprotobuf23 libfluidsynth2 procps libstdc++6 tini +RUN apt install -y gcc g++ libgcc-12-dev libc++-dev gdb libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat-traditional telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \ + libfontconfig1 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadb-dev-compat libduktape207 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates \ + liblua5.3-0 libz3-dev libzadc4 rapidjson-dev tzdata libevent-dev libzip4 libprotobuf32 libfluidsynth3 procps libstdc++6 tini + +# Temp fix for libicu66.1 for RAGE-MP and libssl1.1 for fivem and many more +RUN if [ "$(uname -m)" = "x86_64" ]; then \ + wget http://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu66_66.1-2ubuntu2.1_amd64.deb && \ + wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \ + dpkg -i libicu66_66.1-2ubuntu2.1_amd64.deb && \ + dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \ + rm libicu66_66.1-2ubuntu2.1_amd64.deb libssl1.1_1.1.0g-2ubuntu4_amd64.deb; \ + fi +# ARM64 +RUN if [ ! "$(uname -m)" = "x86_64" ]; then \ + wget http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_arm64.deb && \ + dpkg -i libssl1.1_1.1.1f-1ubuntu2_arm64.deb && \ + rm libssl1.1_1.1.1f-1ubuntu2_arm64.deb; \ + fi ## Configure locale RUN update-locale lang=en_US.UTF-8 \ diff --git a/oses/ubuntu/Dockerfile b/oses/ubuntu/Dockerfile index aec60e1..a4ea9e1 100644 --- a/oses/ubuntu/Dockerfile +++ b/oses/ubuntu/Dockerfile @@ -1,31 +1,35 @@ -FROM --platform=$TARGETOS/$TARGETARCH ubuntu:22.04 +FROM --platform=$TARGETOS/$TARGETARCH ubuntu:24.04 -LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" -ENV DEBIAN_FRONTEND noninteractive +LABEL org.opencontainers.image.source="https://github.com/pelican-eggs/yolks" +LABEL org.opencontainers.image.licenses=MIT -## add container user -RUN useradd -m -d /home/container -s /bin/bash container +ENV DEBIAN_FRONTEND=noninteractive -## update base packages -RUN apt update \ - && apt upgrade -y +## Add container user +RUN useradd -m -d /home/container -s /bin/bash container +ENV USER=container HOME=/home/container -## 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 icu-devtools libunwind8 sqlite3 libsqlite3-dev libzip4 locales ffmpeg apt-transport-https init-system-helpers \ - libcurl3-gnutls liblua5.1-0 libluajit-5.1-2 libsqlite3-0 bzip2 zlib1g libevent-dev libmariadb-dev-compat libmariadb-dev libssl-dev \ - libfluidsynth-dev libmariadb-dev libicu-dev libssl3 libduktape207 libjsoncpp-dev libleveldb1d libncurses5 libncursesw5 tini +## Update base packages +RUN apt update \ + && apt upgrade -y -## configure locale -RUN update-locale lang=en_US.UTF-8 \ - && dpkg-reconfigure --frontend noninteractive locales +## 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-openbsd telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \ + libfontconfig icu-devtools libunwind8 sqlite3 libsqlite3-dev libzip4 locales ffmpeg apt-transport-https init-system-helpers \ + libcurl3-gnutls liblua5.1-0 libluajit-5.1-2 libsqlite3-0 bzip2 zlib1g libevent-dev libmariadb-dev-compat libmariadb-dev libssl-dev \ + libfluidsynth-dev libmariadb-dev libicu-dev libssl3 libduktape207 libjsoncpp-dev libleveldb1d libncurses6 libncursesw6 tini -WORKDIR /home/container +## Configure locale +RUN update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales -STOPSIGNAL SIGINT +WORKDIR /home/container + +STOPSIGNAL SIGINT COPY --chown=container:container ./entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh -ENTRYPOINT ["/usr/bin/tini", "-g", "--"] -CMD ["/entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/postgres/16/Dockerfile b/postgres/16/Dockerfile new file mode 100644 index 0000000..a4eec38 --- /dev/null +++ b/postgres/16/Dockerfile @@ -0,0 +1,21 @@ +# ---------------------------------- +# Environment: Postgres DB +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH postgres:16-alpine + +LABEL author="Parker" maintainer="parker@pterodactyl.io" + +# UID 999 is the default pterodactyl user +RUN adduser -D -h /home/container container + +RUN apk add --no-cache tini curl iproute2 ca-certificates fontconfig git openssl sqlite tar tzdata +USER container +ENV HOME /home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/sbin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/python/3.10/Dockerfile b/python/3.10/Dockerfile index ccfab6e..d7bb607 100644 --- a/python/3.10/Dockerfile +++ b/python/3.10/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH python:3.10-slim +FROM --platform=$TARGETOS/$TARGETARCH python:3.10-slim-bookworm LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/python/3.11/Dockerfile b/python/3.11/Dockerfile index ee9cbd8..902254c 100644 --- a/python/3.11/Dockerfile +++ b/python/3.11/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH python:3.11-slim +FROM --platform=$TARGETOS/$TARGETARCH python:3.11-slim-bookworm LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/python/3.12/Dockerfile b/python/3.12/Dockerfile index 8c830e4..c695449 100644 --- a/python/3.12/Dockerfile +++ b/python/3.12/Dockerfile @@ -1,14 +1,18 @@ -FROM --platform=$TARGETOS/$TARGETARCH python:3.12-slim +FROM --platform=$TARGETOS/$TARGETARCH python:3.12-slim-bookworm LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" RUN apt update \ - && apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps \ + && apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps tini \ && useradd -m -d /home/container container USER container ENV USER=container HOME=/home/container WORKDIR /home/container -COPY ./../entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/python/3.7/Dockerfile b/python/3.7/Dockerfile index 76c9dd8..3d426b9 100644 --- a/python/3.7/Dockerfile +++ b/python/3.7/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH python:3.7-slim +FROM --platform=$TARGETOS/$TARGETARCH python:3.7-slim-bookworm LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/python/3.8/Dockerfile b/python/3.8/Dockerfile index 51928e3..b201ec7 100644 --- a/python/3.8/Dockerfile +++ b/python/3.8/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH python:3.8-slim +FROM --platform=$TARGETOS/$TARGETARCH python:3.8-slim-bookworm LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/python/3.9/Dockerfile b/python/3.9/Dockerfile index f4811df..311a447 100644 --- a/python/3.9/Dockerfile +++ b/python/3.9/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH python:3.9-slim +FROM --platform=$TARGETOS/$TARGETARCH python:3.9-slim-bookworm LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/redis/6/Dockerfile b/redis/6/Dockerfile index 6e253e4..0f90b6f 100644 --- a/redis/6/Dockerfile +++ b/redis/6/Dockerfile @@ -1,7 +1,7 @@ # ---------------------------------- # Environment: redis # ---------------------------------- -FROM --platform=$TARGETOS/$TARGETARCH redis:6-bullseye +FROM --platform=$TARGETOS/$TARGETARCH redis:6-bookworm LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/redis/7/Dockerfile b/redis/7/Dockerfile index 6a95b67..def8d7e 100644 --- a/redis/7/Dockerfile +++ b/redis/7/Dockerfile @@ -1,7 +1,7 @@ # ---------------------------------- # Environment: redis # ---------------------------------- -FROM --platform=$TARGETOS/$TARGETARCH redis:7-bullseye +FROM --platform=$TARGETOS/$TARGETARCH redis:7-bookworm LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/rust/1.56/Dockerfile b/rust/1.56/Dockerfile index 2a33e68..7e655cf 100644 --- a/rust/1.56/Dockerfile +++ b/rust/1.56/Dockerfile @@ -3,7 +3,7 @@ FROM --platform=$TARGETOS/$TARGETARCH rust:1.56-slim LABEL author="Ethan Coward" maintainer="ethan.coward@icloud.com" RUN apt update \ - && apt -y install git dnsutils curl iproute2 ffmpeg tini \ + && apt -y install git dnsutils curl iproute2 ffmpeg tini pkg-config \ && useradd -m -d /home/container container USER container diff --git a/rust/1.60/Dockerfile b/rust/1.60/Dockerfile index 3262022..e637221 100644 --- a/rust/1.60/Dockerfile +++ b/rust/1.60/Dockerfile @@ -3,7 +3,7 @@ FROM --platform=$TARGETOS/$TARGETARCH rust:1.60-slim LABEL author="Ethan Coward" maintainer="ethan.coward@icloud.com" RUN apt update \ - && apt -y install git dnsutils curl iproute2 ffmpeg tini \ + && apt -y install git dnsutils curl iproute2 ffmpeg tini pkg-config \ && useradd -m -d /home/container container USER container diff --git a/rust/latest/Dockerfile b/rust/latest/Dockerfile index e29edeb..cae3044 100644 --- a/rust/latest/Dockerfile +++ b/rust/latest/Dockerfile @@ -3,7 +3,7 @@ FROM --platform=$TARGETOS/$TARGETARCH rust:slim LABEL author="Ethan Coward" maintainer="ethan.coward@icloud.com" RUN apt update \ - && apt -y install git dnsutils curl iproute2 ffmpeg tini \ + && apt -y install git dnsutils curl iproute2 ffmpeg tini pkg-config \ && useradd -m -d /home/container container USER container diff --git a/steamcmd/debian/Dockerfile b/steamcmd/debian/Dockerfile index 0bcf8c9..053daa1 100644 --- a/steamcmd/debian/Dockerfile +++ b/steamcmd/debian/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" @@ -10,7 +10,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN dpkg --add-architecture i386 \ && apt-get update \ && apt-get upgrade -y \ - && apt-get install -y tar curl gcc g++ lib32gcc-s1 libgcc1 libcurl4-gnutls-dev:i386 libssl1.1:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 libsdl2-2.0-0 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat tzdata numactl xvfb tini \ + && apt-get install -y tar curl gcc g++ lib32gcc-s1 libgcc-12-dev libgcc-11-dev libcurl4-gnutls-dev:i386 libssl-dev:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 libsdl2-2.0-0 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat-traditional tzdata numactl xvfb wget tini \ && useradd -m -d /home/container container ## install rcon @@ -19,6 +19,13 @@ RUN cd /tmp/ \ && tar xvf rcon.tar.gz \ && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + # Temp fix for things that still need libssl1.1 +RUN if [ "$(uname -m)" = "x86_64" ]; then \ + wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \ + dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \ + rm libssl1.1_1.1.0g-2ubuntu4_amd64.deb; \ + fi + USER container ENV USER=container HOME=/home/container WORKDIR /home/container diff --git a/steamcmd/dotnet/Dockerfile b/steamcmd/dotnet/Dockerfile index e90ae75..52e26e6 100644 --- a/steamcmd/dotnet/Dockerfile +++ b/steamcmd/dotnet/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim LABEL author="Torsten Widmann" maintainer="info@goover.de" @@ -7,18 +7,18 @@ ENV DEBIAN_FRONTEND noninteractive RUN dpkg --add-architecture i386 \ && apt update \ && apt upgrade -y \ - && apt install -y tar curl gcc g++ lib32gcc-s1 libgcc1 libcurl4-gnutls-dev:i386 libssl1.1:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat tzdata \ + && apt install -y tar curl gcc g++ lib32gcc-s1 libgcc1 libcurl4-gnutls-dev:i386 libssl-dev:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat-traditional tzdata \ && apt install -y libstdc++6 libstdc++6:i386 libc6-amd64 libc6:i386 psmisc libgdiplus libcurl4 libfontconfig1 libpangocairo-1.0-0 libnss3 libgconf-2-4 libxi6 libxcursor1 libxss1 libxcomposite1 libasound2 libxdamage1 libxtst6 libatk1.0-0 libxrandr2 libcurl4 xvfb mesa-utils git \ && apt install -y python3 python3-dev python3-pip apt-transport-https wget iproute2 sqlite3 xvfb tini \ && useradd -d /home/container -m container RUN apt update -y \ && apt upgrade -y \ - && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ + && wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ && dpkg -i packages-microsoft-prod.deb \ && rm packages-microsoft-prod.deb \ && apt update -y \ - && apt install -y aspnetcore-runtime-7.0 dotnet-sdk-7.0 libgdiplus + && apt install -y aspnetcore-runtime-7.0 dotnet-sdk-7.0 libgdiplus aspnetcore-runtime-8.0 dotnet-sdk-8.0 ## install rcon RUN cd /tmp/ \ diff --git a/steamcmd/entrypoint.sh b/steamcmd/entrypoint.sh index 70965a9..891d0f0 100644 --- a/steamcmd/entrypoint.sh +++ b/steamcmd/entrypoint.sh @@ -39,6 +39,8 @@ if [ -f "/usr/local/bin/proton" ]; then mkdir -p /home/container/.steam/steam/steamapps/compatdata/${SRCDS_APPID} export STEAM_COMPAT_CLIENT_INSTALL_PATH="/home/container/.steam/steam" export STEAM_COMPAT_DATA_PATH="/home/container/.steam/steam/steamapps/compatdata/${SRCDS_APPID}" + # Fix for pipx with protontricks + export PATH=$PATH:/root/.local/bin else echo -e "----------------------------------------------------------------------------------" echo -e "WARNING!!! Proton needs variable SRCDS_APPID, else it will not work. Please add it" @@ -67,9 +69,9 @@ if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then # Update Source Server if [ ! -z ${SRCDS_APPID} ]; then if [ "${STEAM_USER}" == "anonymous" ]; then - ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) ${INSTALL_FLAGS} $( [[ "${VALIDATE}" == "1" ]] && printf %s 'validate' ) +quit else - numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit + numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) ${INSTALL_FLAGS} $( [[ "${VALIDATE}" == "1" ]] && printf %s 'validate' ) +quit fi else echo -e "No appid set. Starting Server" diff --git a/steamcmd/proton/Dockerfile b/steamcmd/proton/Dockerfile index 0a9e02e..309391e 100644 --- a/steamcmd/proton/Dockerfile +++ b/steamcmd/proton/Dockerfile @@ -1,7 +1,7 @@ # --------------------------------------------- # Steam Proton image # --------------------------------------------- -FROM debian:bullseye-slim +FROM debian:bookworm-slim LABEL author="Torsten Widmann" maintainer="info@goover.de" @@ -9,7 +9,7 @@ LABEL author="Torsten Widmann" maintainer="info@goover.de" RUN dpkg --add-architecture i386 RUN apt update RUN apt install -y --no-install-recommends wget iproute2 gnupg2 software-properties-common libntlm0 winbind xvfb xauth libncurses5-dev:i386 libncurses6 dbus libgdiplus lib32gcc-s1 -RUN apt install -y alsa-tools libpulse0 pulseaudio libpulse-dev libasound2 libao-common gnutls-bin gnupg locales numactl cabextract curl python3 python3-pip python3-setuptools +RUN apt install -y alsa-tools libpulse0 pulseaudio libpulse-dev libasound2 libao-common gnutls-bin gnupg locales numactl cabextract curl python3 python3-pip python3-setuptools tini file pipx RUN useradd -d /home/container -m container # Download Proton GE @@ -24,7 +24,7 @@ RUN rm /var/lib/dbus/machine-id RUN dbus-uuidgen --ensure #Setup Protontricks -RUN python3 -m pip install protontricks +RUN pipx install protontricks # Set up Winetricks RUN wget -q -O /usr/sbin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ @@ -40,5 +40,9 @@ 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 +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/steamcmd/proton_8/Dockerfile b/steamcmd/proton_8/Dockerfile new file mode 100644 index 0000000..a7a74bd --- /dev/null +++ b/steamcmd/proton_8/Dockerfile @@ -0,0 +1,48 @@ +# --------------------------------------------- +# Steam Proton image +# --------------------------------------------- +FROM debian:bookworm-slim + +LABEL author="Torsten Widmann" maintainer="info@goover.de" + +## install required packages +RUN dpkg --add-architecture i386 +RUN apt update +RUN apt install -y --no-install-recommends wget iproute2 gnupg2 software-properties-common libntlm0 winbind xvfb xauth libncurses5-dev:i386 libncurses6 dbus libgdiplus lib32gcc-s1 +RUN apt install -y alsa-tools libpulse0 pulseaudio libpulse-dev libasound2 libao-common gnutls-bin gnupg locales numactl cabextract curl python3 python3-pip python3-setuptools tini file pipx +RUN useradd -d /home/container -m container + +# Download Proton GE +RUN curl -sLOJ "$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/tags/GE-Proton8-32 | grep browser_download_url | cut -d\" -f4 | egrep .tar.gz)" +RUN tar -xzf GE-Proton*.tar.gz -C /usr/local/bin/ --strip-components=1 +RUN rm GE-Proton*.* + +# Proton Fix machine-id +RUN rm -f /etc/machine-id +RUN dbus-uuidgen --ensure=/etc/machine-id +RUN rm /var/lib/dbus/machine-id +RUN dbus-uuidgen --ensure + +#Setup Protontricks +RUN pipx install protontricks + +# Set up Winetricks +RUN wget -q -O /usr/sbin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ + && chmod +x /usr/sbin/winetricks + +## install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/steamcmd/sniper/Dockerfile b/steamcmd/sniper/Dockerfile new file mode 100644 index 0000000..bc4c8eb --- /dev/null +++ b/steamcmd/sniper/Dockerfile @@ -0,0 +1,31 @@ +# --------------------------------------------- +# Steam Sniper image (RT3) +# --------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH registry.gitlab.steamos.cloud/steamrt/sniper/platform:latest-container-runtime-depot + +LABEL author="Alexander Ballauf" maintainer="admin@ballaual.de" +LABEL org.opencontainers.image.description SteamRT3 Platform image for Pterodactyl Source engine servers. + +## install required packages +RUN dpkg --add-architecture i386 \ + && apt-get update \ + && apt-get upgrade -y \ + && apt-get install -y tar curl gcc g++ lib32gcc-s1 libgcc1 libcurl4-gnutls-dev:i386 libssl1.1:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 libsdl2-2.0-0 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat tzdata numactl xvfb tini libc6 \ + && useradd -m -d /home/container container + +## install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/voice/mumble/Dockerfile b/voice/mumble/Dockerfile index f22b797..84ca88b 100644 --- a/voice/mumble/Dockerfile +++ b/voice/mumble/Dockerfile @@ -1,22 +1,40 @@ -FROM --platform=$TARGETOS/$TARGETARCH alpine:3.16 +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim AS builder -LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" +# Copy and run the build script +COPY build.sh /build.sh +RUN chmod +x /build.sh +RUN cd / && ./build.sh -LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" -LABEL org.opencontainers.image.licenses=MIT +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim -## install dependencies -RUN apk add --no-cache murmur tini +# Create necessary directories +RUN mkdir -p /usr/local/bin /usr/local/share/mumble -RUN adduser -D container +# Copy the built Mumble server binary and the latest tag file and the build log from the builder stage +COPY --from=builder /usr/src/mumble/git/build/mumble-server /usr/local/bin/mumble-server +COPY --from=builder /usr/src/mumble/git/build/latest_tag.txt /usr/local/share/mumble/latest_tag.txt +COPY --from=builder /usr/src/mumble/build.log /usr/local/share/mumble/build.log -USER container -ENV USER=container HOME=/home/container +# Install runtime dependencies +RUN apt update \ + && apt -y install curl tar tzdata file ca-certificates sqlite3 iproute2 tini \ + && useradd -m -d /home/container container + +# Needed packages to run the mumble server +RUN apt -y install libqt5sql5 libqt5sql5-sqlite libavahi-compat-libdnssd-dev libqt5dbus5 libzeroc-ice-dev libprotobuf-dev qtbase5-dev qtbase5-dev-tools + +# Set up user and working directory +USER container +ENV USER=container HOME=/home/container WORKDIR /home/container +# Set the stop signal STOPSIGNAL SIGINT -COPY --chown=container:container ./entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh -ENTRYPOINT ["/sbin/tini", "-g", "--"] -CMD ["/entrypoint.sh"] +# Copy and set up the entrypoint script +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +# Define entrypoint and command +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/voice/mumble/build.sh b/voice/mumble/build.sh new file mode 100644 index 0000000..f289008 --- /dev/null +++ b/voice/mumble/build.sh @@ -0,0 +1,155 @@ +#!/bin/bash + +# Mumble compile script. +# Runs on Debian 12 + +LOGFILE="/usr/src/mumble/build.log" + +log() { + echo "$(date +'%Y-%m-%d %H:%M:%S') - $1" | tee -a $LOGFILE +} + +install_dep(){ + log "Installing dependencies..." + apt update && apt -y install \ + build-essential \ + cmake \ + pkg-config \ + qtbase5-dev \ + qtchooser \ + qt5-qmake \ + qtbase5-dev-tools \ + qttools5-dev \ + qttools5-dev-tools \ + libqt5svg5-dev \ + libboost-dev \ + libssl-dev \ + libprotobuf-dev \ + protobuf-compiler \ + libprotoc-dev \ + libcap-dev \ + libxi-dev \ + libasound2-dev \ + libogg-dev \ + libsndfile1-dev \ + libspeechd-dev \ + libavahi-compat-libdnssd-dev \ + libxcb-xinerama0 \ + libzeroc-ice-dev \ + libpoco-dev \ + jq \ + python3 \ + curl \ + git + + if [[ $? -ne 0 ]]; then + log "Failed to install dependencies" + exit 1 + fi + log "Dependencies installed successfully" +} + +# Function to install g++-multilib on amd64 +install_amd64_multilib() { + apt -y install g++-multilib + + if [[ $? -ne 0 ]]; then + log "Failed to install amd multilib dependency" + exit 1 + fi + + log "Multilib AMD64 installed successfully" +} + +# Function to install multilib support on arm64 +install_arm64_multilib() { + apt -y install g++-multilib-x86-64-linux-gnu g++-aarch64-linux-gnu libc6-dev-armhf-cross + + if [[ $? -ne 0 ]]; then + log "Failed to install amd multilib dependency" + exit 1 + fi + + log "Multilib ARM64 installed successfully" +} + +clone_mumble(){ + log "Cloning the Mumble repository..." + + # Create the necessary directories + mkdir -p /usr/src/mumble/git && cd /usr/src/mumble/git + + # Fetch the latest release tag from the GitHub API + LATEST_TAG=$(curl -s "https://api.github.com/repos/mumble-voip/mumble/releases/latest" | jq -r .tag_name) + if [[ $? -ne 0 || -z "$LATEST_TAG" ]]; then + log "Failed to fetch the latest release tag" + exit 1 + fi + echo "The latest tag is: $LATEST_TAG" | tee -a $LOGFILE + + # Clone the repository + echo "Running: git clone --branch \"$LATEST_TAG\" https://github.com/mumble-voip/mumble.git ." + git clone --branch "$LATEST_TAG" https://github.com/mumble-voip/mumble.git . + if [[ $? -ne 0 ]]; then + log "Failed to clone the repository" + exit 1 + fi + + # Clone the submodules + git submodule update --init --recursive + if [[ $? -ne 0 ]]; then + log "Failed to update submodules" + exit 1 + fi + + # Create and navigate to the build directory + mkdir -p build && cd build + + echo "$LATEST_TAG" > latest_tag.txt + + # Run cmake with the specified options + cmake -Dbundled-opus=OFF -Dclient=OFF -Dstatic=ON -DCMAKE_BUILD_TYPE=Release .. + if [[ $? -ne 0 ]]; then + log "CMake configuration failed" + exit 1 + fi + + log "Repository cloned and configured successfully" +} + +build_mumble(){ + log "Building Mumble server..." + + cd /usr/src/mumble/git/build + + echo "Using $(nproc) threads to build Mumble server" | tee -a $LOGFILE + cmake --build . -j $(nproc) + if [[ $? -ne 0 ]]; then + log "Build failed" + exit 1 + fi + + ls -la | tee -a $LOGFILE + log "Build completed successfully" +} + +# Install normal deps +install_dep + +# Detect the architecture +ARCH=$(dpkg --print-architecture) + +# Install ARCH specific deps +if [ "$ARCH" = "amd64" ]; then + echo "Detected architecture: amd64" + install_amd64_multilib +elif [ "$ARCH" = "arm64" ]; then + echo "Detected architecture: arm64" + install_arm64_multilib +else + echo "Unsupported architecture: $ARCH" + exit 1 +fi + +clone_mumble +build_mumble diff --git a/voice/mumble/entrypoint.sh b/voice/mumble/entrypoint.sh index bbafa01..e7c94f8 100644 --- a/voice/mumble/entrypoint.sh +++ b/voice/mumble/entrypoint.sh @@ -1,10 +1,13 @@ -#!/bin/ash +#!/bin/bash cd /home/container # Make internal Docker IP address available to processes. INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') export INTERNAL_IP +# Print the Muble server version +echo -e "Mumble release version:" +cat /usr/local/share/mumble/latest_tag.txt # Replace Startup Variables MODIFIED_STARTUP=$(echo -e $(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')) diff --git a/voice/teaspeak/Dockerfile b/voice/teaspeak/Dockerfile index cc46233..068c1ca 100644 --- a/voice/teaspeak/Dockerfile +++ b/voice/teaspeak/Dockerfile @@ -20,7 +20,7 @@ # SOFTWARE. # -FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim LABEL author="Torsten Widmann" maintainer="info@goover.de" @@ -37,7 +37,7 @@ RUN apt update \ RUN apt install -y ffmpeg curl python3 iproute2 libjemalloc2 tini # Install latest youtube-dl -RUN curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl +RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/youtube-dl RUN chmod a+rx /usr/local/bin/youtube-dl RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1000 diff --git a/voice/teaspeak/entrypoint.sh b/voice/teaspeak/entrypoint.sh index 9b0d21f..6142333 100644 --- a/voice/teaspeak/entrypoint.sh +++ b/voice/teaspeak/entrypoint.sh @@ -15,10 +15,10 @@ echo "installed youtube-dl Version:" # 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 -)") +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') -# 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" +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer@pelican~ \033[0m" +echo "$PARSED" # shellcheck disable=SC2086 -exec env ${PARSED} +eval "$PARSED" diff --git a/wine/devel/Dockerfile b/wine/devel/Dockerfile index a8fa953..d62b895 100644 --- a/wine/devel/Dockerfile +++ b/wine/devel/Dockerfile @@ -11,10 +11,15 @@ RUN dpkg --add-architecture i386 \ && apt update -y \ && apt install -y --no-install-recommends gnupg2 numactl tzdata software-properties-common libntlm0 winbind xvfb xauth python3 libncurses5:i386 libncurses6:i386 libsdl2-2.0-0 libsdl2-2.0-0:i386 +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + # Install wine and with recommends RUN mkdir -pm755 /etc/apt/keyrings RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key -RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bullseye/winehq-bullseye.sources +RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources RUN apt update RUN apt install --install-recommends winehq-devel cabextract wine-binfmt -y diff --git a/wine/entrypoint.sh b/wine/entrypoint.sh index 89a7ec0..d79d6db 100644 --- a/wine/entrypoint.sh +++ b/wine/entrypoint.sh @@ -26,9 +26,9 @@ if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then # Update Source Server if [ ! -z ${SRCDS_APPID} ]; then if [ "${STEAM_USER}" == "anonymous" ]; then - ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit else - numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit + numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit fi else echo -e "No appid set. Starting Server" @@ -70,7 +70,7 @@ if [[ $WINETRICKS_RUN =~ mono ]]; then WINETRICKS_RUN=${WINETRICKS_RUN/mono} if [ ! -f "$WINEPREFIX/mono.msi" ]; then - wget -q -O $WINEPREFIX/mono.msi https://dl.winehq.org/wine/wine-mono/8.0.0/wine-mono-8.0.0-x86.msi + wget -q -O $WINEPREFIX/mono.msi https://dl.winehq.org/wine/wine-mono/9.1.0/wine-mono-9.1.0-x86.msi fi wine msiexec /i $WINEPREFIX/mono.msi /qn /quiet /norestart /log $WINEPREFIX/mono_install.log diff --git a/wine/latest/Dockerfile b/wine/latest/Dockerfile index 8d56bb2..ce984dd 100644 --- a/wine/latest/Dockerfile +++ b/wine/latest/Dockerfile @@ -11,10 +11,15 @@ RUN dpkg --add-architecture i386 \ && apt update -y \ && apt install -y --no-install-recommends gnupg2 numactl tzdata software-properties-common libntlm0 winbind xvfb xauth python3 libncurses5:i386 libncurses6:i386 libsdl2-2.0-0 libsdl2-2.0-0:i386 +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + # Install wine and with recommends RUN mkdir -pm755 /etc/apt/keyrings RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key -RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bullseye/winehq-bullseye.sources +RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources RUN apt update RUN apt install --install-recommends winehq-stable cabextract wine-binfmt -y diff --git a/wine/staging/Dockerfile b/wine/staging/Dockerfile index ba7075c..990d35a 100644 --- a/wine/staging/Dockerfile +++ b/wine/staging/Dockerfile @@ -11,10 +11,15 @@ RUN dpkg --add-architecture i386 \ && apt update -y \ && apt install -y --no-install-recommends gnupg2 numactl tzdata software-properties-common libntlm0 winbind xvfb xauth python3 libncurses5:i386 libncurses6:i386 libsdl2-2.0-0 libsdl2-2.0-0:i386 +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + # Install wine and with recommends RUN mkdir -pm755 /etc/apt/keyrings RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key -RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bullseye/winehq-bullseye.sources +RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources RUN apt update RUN apt install --install-recommends winehq-staging cabextract wine-binfmt -y