From 9c5e5424c3d9423712a074f71eed0260f7da806d Mon Sep 17 00:00:00 2001 From: zontreck Date: Sun, 9 Feb 2025 19:25:24 -0700 Subject: [PATCH] Bump proton version --- Jenkinsfile | 2 + steamcmd/proton/Dockerfile | 12 +++--- steamcmd/proton_9.13/Dockerfile | 48 ++++++++++++++++++++++ steamcmd/proton_9.13/entrypoint.sh | 66 ++++++++++++++++++++++++++++++ 4 files changed, 122 insertions(+), 6 deletions(-) create mode 100644 steamcmd/proton_9.13/Dockerfile create mode 100644 steamcmd/proton_9.13/entrypoint.sh diff --git a/Jenkinsfile b/Jenkinsfile index 8c23810..a683c25 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -213,6 +213,7 @@ pipeline { docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_debian steamcmd/debian docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_dotnet steamcmd/dotnet docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_proton steamcmd/proton + docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_proton9_13 steamcmd/proton_9.13 docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_proton8 steamcmd/proton_8 docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_sniper steamcmd/sniper docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_ubuntu steamcmd/ubuntu @@ -234,6 +235,7 @@ pipeline { docker push git.zontreck.com/ariascreations/yolks:steamcmd_debian docker push git.zontreck.com/ariascreations/yolks:steamcmd_dotnet docker push git.zontreck.com/ariascreations/yolks:steamcmd_proton + docker push git.zontreck.com/ariascreations/yolks:steamcmd_proton9_13 docker push git.zontreck.com/ariascreations/yolks:steamcmd_proton8 docker push git.zontreck.com/ariascreations/yolks:steamcmd_sniper docker push git.zontreck.com/ariascreations/yolks:steamcmd_ubuntu diff --git a/steamcmd/proton/Dockerfile b/steamcmd/proton/Dockerfile index b60ed08..c383f79 100644 --- a/steamcmd/proton/Dockerfile +++ b/steamcmd/proton/Dockerfile @@ -3,7 +3,7 @@ FROM debian:bookworm-slim LABEL author="Tara Piccari" maintainer="tarapiccari@gmail.com" LABEL upstream="https://github.com/pelican-eggs/yolks" -ENV PROTON_VERSION=9-13 +ENV PROTON_VERSION=9-23 ## install required packages RUN dpkg --add-architecture i386 @@ -28,14 +28,14 @@ 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 + && 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/ - + && 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 diff --git a/steamcmd/proton_9.13/Dockerfile b/steamcmd/proton_9.13/Dockerfile new file mode 100644 index 0000000..b60ed08 --- /dev/null +++ b/steamcmd/proton_9.13/Dockerfile @@ -0,0 +1,48 @@ +FROM debian:bookworm-slim + +LABEL author="Tara Piccari" maintainer="tarapiccari@gmail.com" +LABEL upstream="https://github.com/pelican-eggs/yolks" + +ENV PROTON_VERSION=9-13 + +## 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 wget https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton${PROTON_VERSION}/GE-Proton${PROTON_VERSION}.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/proton_9.13/entrypoint.sh b/steamcmd/proton_9.13/entrypoint.sh new file mode 100644 index 0000000..04dbf26 --- /dev/null +++ b/steamcmd/proton_9.13/entrypoint.sh @@ -0,0 +1,66 @@ + +# Wait for the container to fully initialize +sleep 1 + +# Default the TZ environment variable to UTC. +TZ=${TZ:-UTC} +export TZ + +# Set environment variable that holds the Internal Docker IP +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Set environment for Steam Proton +if [ -f "/usr/local/bin/proton" ]; then + if [ ! -z ${SRCDS_APPID} ]; 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" + echo -e "Server stops now" + echo -e "----------------------------------------------------------------------------------" + exit 0 + fi +fi + +# Switch to the container's working directory +cd /home/container || exit 1 + +## just in case someone removed the defaults. +if [ "${STEAM_USER}" == "" ]; then + echo -e "steam user is not set.\n" + echo -e "Using anonymous user.\n" + STEAM_USER=anonymous + STEAM_PASS="" + STEAM_AUTH="" +else + echo -e "user set to ${STEAM_USER}" +fi + +## if auto_update is not set or to 1 update +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} +app_update 1007 $( [[ -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} +app_update 1007 $( [[ -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" + fi + +else + echo -e "Not updating game server as auto update was set to 0. Starting Server" +fi + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} \ No newline at end of file