From 14188ab4dc59f97c97dd281124c90c0c466753f1 Mon Sep 17 00:00:00 2001 From: gOOvER Date: Sat, 14 Dec 2024 07:32:27 +0100 Subject: [PATCH] starting to rewrite deportdownloader images, because they will be default in my egg in future --- depotdl/debian/Dockerfile | 14 ++++++------- depotdl/entrypoint.sh | 42 ++++++++++++++++----------------------- depotdl/sources.list | 14 ------------- depotdl/wine/Dockerfile | 11 +++++----- wine/staging/Dockerfile | 8 ++++---- 5 files changed, 33 insertions(+), 56 deletions(-) delete mode 100644 depotdl/sources.list diff --git a/depotdl/debian/Dockerfile b/depotdl/debian/Dockerfile index 8014dfce..a50c8878 100644 --- a/depotdl/debian/Dockerfile +++ b/depotdl/debian/Dockerfile @@ -3,11 +3,11 @@ FROM --platform=$BUILDPLATFORM debian:bookworm-slim LABEL author="Torsten Widmann" maintainer="info@goover.de" LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images" LABEL org.opencontainers.image.licenses=AGPL -LABEL org.opencontainers.image.description Dockerimage for Pelican Hosting Panel and PterodactylLABEL org.opencontainers.image.description Dockerimage for Pelican Hosting Panel and Pterodactyl +LABEL org.opencontainers.image.description Dockerimage for Pelican Hosting Panel and Pterodactyl + ARG DEBIAN_FRONTEND=noninteractive -COPY sources.list /etc/apt/sources.list RUN dpkg --add-architecture i386 RUN apt update RUN apt -y upgrade @@ -96,8 +96,8 @@ RUN apt update -y \ && rm packages-microsoft-prod.deb \ && apt update -y \ && apt install -y \ - aspnetcore-runtime-8.0 \ - dotnet-sdk-8.0 + aspnetcore-runtime-9.0 \ + dotnet-sdk-9.0 RUN curl -sLOJ $(curl -s https://api.github.com/repos/SteamRE/DepotDownloader/releases/latest | grep browser_download_url | cut -d\" -f4 | egrep linux-x64.zip) RUN unzip DepotDownloader-linux-x64.zip -d /usr/local/bin/ @@ -112,8 +112,8 @@ RUN cd /tmp/ \ # Set the locale RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ locale-gen -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 ## Prepare NSS Wrapper for the entrypoint as a workaround for Valheim requiring a valid UID @@ -135,4 +135,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/depotdl/entrypoint.sh b/depotdl/entrypoint.sh index 3b7071af..57bb672b 100644 --- a/depotdl/entrypoint.sh +++ b/depotdl/entrypoint.sh @@ -6,6 +6,7 @@ GREEN='\033[0;32m' YELLOW='\033[1;33m' BLUE='\033[0;34m' NC='\033[0m' +HOME=/home/container # Wait for the container to fully initialize sleep 1 @@ -35,39 +36,30 @@ echo -e "${GREEN}Starting Server.... Please wait...${NC}" echo -e "${BLUE}---------------------------------------------------------------------${NC}" ## just in case someone removed the defaults. -#if [ "${STEAM_USER}" == "" ]; then -# echo -e "${BLUE}---------------------------------------------------------------------${NC}" -# echo -e "${YELLOW}Steam user is not set. ${NC}" -# echo -e "${YELLOW}Using anonymous user.${NC}" -# echo -e "${BLUE}---------------------------------------------------------------------${NC}" -# STEAM_USER=anonymous -# STEAM_PASS="" -# STEAM_AUTH="" -#else -# echo -e "${BLUE}---------------------------------------------------------------------${NC}" -# echo -e "${YELLOW}user set to ${STEAM_USER} ${NC}" -# echo -e "${BLUE}---------------------------------------------------------------------${NC}" -#fi +if [ "${STEAM_USER}" == "" ]; then + echo -e "${BLUE}---------------------------------------------------------------------${NC}" + echo -e "${YELLOW}Steam user is not set. ${NC}" + echo -e "${YELLOW}Using anonymous user.${NC}" + echo -e "${BLUE}---------------------------------------------------------------------${NC}" + STEAM_USER=anonymous + STEAM_PASS="" + STEAM_AUTH="" +else + echo -e "${BLUE}---------------------------------------------------------------------${NC}" + echo -e "${YELLOW}user set to ${STEAM_USER} ${NC}" + echo -e "${BLUE}---------------------------------------------------------------------${NC}" +fi ## if auto_update is not set or to 1 update -if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then - # Update Source Server - if [ ! -z ${STEAM_APPID} ]; then - DepotDownloader -dir $HOME $( [[ -z ${STEAM_USER} ]] || printf %s "-username ${STEAM_USER} -password ${STEAM_PASS} -remember-password" ) $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '-os windows' ) -app ${STEAM_APPID} $( [[ -z ${STEAM_BETAID} ]] || printf %s "-beta ${STEAM_BETAID}" ) $( [[ -z ${STEAM_BETAPASS} ]] || printf %s "-betapassword ${STEAM_BETAPASS}" ) $( [[ "${STEAM_VALIDATE}" == "1" ]] && printf %s '-validate' ) - else - echo -e "${BLUE}---------------------------------------------------------------------${NC}" - echo -e "${YELLOW}No appid set. Starting Server${NC}" - echo -e "${BLUE}---------------------------------------------------------------------${NC}" - fi - +if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then + DepotDownloader -dir /home/container $( [[ -z ${STEAM_USER} ]] || printf %s "-username ${STEAM_USER} -password ${STEAM_PASS} -remember-password" ) $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '-os windows' ) -app ${STEAM_APPID} $( [[ -z ${STEAM_BETAID} ]] || printf %s "-beta ${STEAM_BETAID}" ) $( [[ -z ${STEAM_BETAPASS} ]] || printf %s "-betapassword ${STEAM_BETAPASS}" ) $( [[ "${STEAM_VALIDATE}" == "1" ]] && printf %s '-validate' ) + DepotDownloader -dir /home/container -app 1007 else echo -e "${BLUE}---------------------------------------------------------------${NC}" echo -e "${YELLOW}Not updating game server as auto update was set to 0. Starting Server${NC}" echo -e "${BLUE}---------------------------------------------------------------${NC}" fi -chmod +x /home/container/7DaysToDieServer.x86_64 - # Replace Startup Variables MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') echo -e ":/home/container$ ${MODIFIED_STARTUP}" diff --git a/depotdl/sources.list b/depotdl/sources.list deleted file mode 100644 index 2824c781..00000000 --- a/depotdl/sources.list +++ /dev/null @@ -1,14 +0,0 @@ -deb http://deb.debian.org/debian/ bookworm contrib main non-free non-free-firmware -# deb-src http://deb.debian.org/debian/ bookworm contrib main non-free non-free-firmware - -deb http://deb.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware -# deb-src http://deb.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware - -deb http://deb.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware -# deb-src http://deb.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware - -deb http://deb.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware -# deb-src http://deb.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware - -deb http://deb.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware -# deb-src http://deb.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware \ No newline at end of file diff --git a/depotdl/wine/Dockerfile b/depotdl/wine/Dockerfile index 4cbb336a..1012c638 100644 --- a/depotdl/wine/Dockerfile +++ b/depotdl/wine/Dockerfile @@ -2,11 +2,10 @@ FROM debian:bookworm-slim LABEL author="Torsten Widmann" maintainer="info@goover.de" LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images" -LABEL org.opencontainers.image.licenses=MIT +LABEL org.opencontainers.image.licenses=AGPL ## install required packages ARG DEBIAN_FRONTEND=noninteractive -COPY sources.list /etc/apt/sources.list RUN dpkg --add-architecture i386 RUN apt update RUN apt -y upgrade @@ -67,7 +66,7 @@ RUN apt install -y --no-install-recommends \ libunwind8 \ libz-dev \ libzip4 - + RUN rm -rf /var/lib/apt/lists/* # Install wine and with recommends @@ -104,8 +103,8 @@ ENV DISPLAY_DEPTH=16 # Set the locale RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ locale-gen -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 ## Setup user and working directory @@ -120,4 +119,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/wine/staging/Dockerfile b/wine/staging/Dockerfile index 5738e805..87f24cd8 100644 --- a/wine/staging/Dockerfile +++ b/wine/staging/Dockerfile @@ -2,7 +2,7 @@ FROM debian:bookworm-slim LABEL author="Torsten Widmann" maintainer="info@goover.de" LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images" -LABEL org.opencontainers.image.licenses=MIT +LABEL org.opencontainers.image.licenses=AGPL ## install required packages ARG DEBIAN_FRONTEND=noninteractive @@ -68,7 +68,7 @@ RUN apt install -y --no-install-recommends \ libunwind8 \ libz-dev \ libzip4 - + RUN rm -rf /var/lib/apt/lists/* # Install wine and with recommends @@ -100,8 +100,8 @@ ENV DISPLAY_DEPTH=16 # Set the locale RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ locale-gen -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 RUN bash -c 'echo "vm.max_map_count = 16777216" > /etc/sysctl.d/20-max_map_count.conf'