From 537f9dbdb1b8ffeb0438dd45b9ca84885e2a7603 Mon Sep 17 00:00:00 2001 From: gOOvER Date: Tue, 14 Feb 2023 16:25:39 +0100 Subject: [PATCH 1/6] add steam Proton Support --- .github/workflows/steamcmd.yml | 2 +- README.md | 2 ++ steamcmd/entrypoint.sh | 6 +++++- steamcmd/proton/Dockerfile | 37 ++++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 steamcmd/proton/Dockerfile diff --git a/.github/workflows/steamcmd.yml b/.github/workflows/steamcmd.yml index 9221e31..9b3ed3f 100644 --- a/.github/workflows/steamcmd.yml +++ b/.github/workflows/steamcmd.yml @@ -19,7 +19,7 @@ jobs: - debian - ubuntu - dotnet - + - proton steps: - uses: actions/checkout@v3 - uses: docker/setup-buildx-action@v2 diff --git a/README.md b/README.md index 75f0684..67837d9 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,8 @@ is tagged correctly. * `ghcr.io/parkervcp/steamcmd:debian` * [`SteamCMD Debian Dotnet`](/steamcmd/dotnet) * `ghcr.io/parkervcp/steamcmd:dotnet` +* [`SteamCMD Proton`](/steamcmd/proton) + * `ghcr.io/parkervcp/steamcmd:proton` * [`SteamCMD Ubuntu latest LTS`](/steamcmd/ubuntu) * `ghcr.io/parkervcp/steamcmd:ubuntu` diff --git a/steamcmd/entrypoint.sh b/steamcmd/entrypoint.sh index 153b869..df10978 100644 --- a/steamcmd/entrypoint.sh +++ b/steamcmd/entrypoint.sh @@ -33,10 +33,14 @@ export TZ INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') export INTERNAL_IP +# Set environment for Steam Proton +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}" + # 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" diff --git a/steamcmd/proton/Dockerfile b/steamcmd/proton/Dockerfile new file mode 100644 index 0000000..b7aa6b8 --- /dev/null +++ b/steamcmd/proton/Dockerfile @@ -0,0 +1,37 @@ +# --------------------------------------------- +# Generic Wine image with Steam support +# --------------------------------------------- +FROM debian:bullseye-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 python3 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 +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/latest | 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 + +## install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.2/rcon-0.10.2-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.2-amd64_linux/rcon /usr/local/bin/ + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] \ No newline at end of file From 92741741344c82c8e66969c88972704569e9a90a Mon Sep 17 00:00:00 2001 From: gOOvER Date: Tue, 14 Feb 2023 16:32:30 +0100 Subject: [PATCH 2/6] fixes --- steamcmd/proton/Dockerfile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/steamcmd/proton/Dockerfile b/steamcmd/proton/Dockerfile index b7aa6b8..14982d3 100644 --- a/steamcmd/proton/Dockerfile +++ b/steamcmd/proton/Dockerfile @@ -1,27 +1,27 @@ # --------------------------------------------- -# Generic Wine image with Steam support +# Steam Proton image # --------------------------------------------- -FROM debian:bullseye-slim +FROM debian:bullseye-slim -LABEL author="Torsten Widmann" maintainer="info@goover.de" +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 python3 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 -RUN useradd -d /home/container -m container +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 python3 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 +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/latest | 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*.* +RUN curl -sLOJ $(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | 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 +RUN rm -f /etc/machine-id +RUN dbus-uuidgen --ensure=/etc/machine-id +RUN rm /var/lib/dbus/machine-id +RUN dbus-uuidgen --ensure ## install rcon RUN cd /tmp/ \ From 7c3c8468da209b9530ac2e33ecd67a9f7a2ace91 Mon Sep 17 00:00:00 2001 From: gOOvER Date: Thu, 16 Feb 2023 15:55:15 +0100 Subject: [PATCH 3/6] added winetricks and protontricks --- steamcmd/entrypoint.sh | 13 ++++++++++--- steamcmd/proton/Dockerfile | 11 +++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/steamcmd/entrypoint.sh b/steamcmd/entrypoint.sh index df10978..a546a4b 100644 --- a/steamcmd/entrypoint.sh +++ b/steamcmd/entrypoint.sh @@ -34,9 +34,16 @@ INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') export INTERNAL_IP # Set environment for Steam Proton -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}" +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}" + else + echo -e "No appid set. Stopping server" + exit 1 + fi +fi # Switch to the container's working directory cd /home/container || exit 1 diff --git a/steamcmd/proton/Dockerfile b/steamcmd/proton/Dockerfile index 14982d3..ed5f559 100644 --- a/steamcmd/proton/Dockerfile +++ b/steamcmd/proton/Dockerfile @@ -8,8 +8,8 @@ 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 python3 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 +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 python3-venv pipx RUN useradd -d /home/container -m container # Download Proton GE @@ -23,6 +23,13 @@ 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.2/rcon-0.10.2-amd64_linux.tar.gz > rcon.tar.gz \ From c65c2ea1e73fa4a4f7d5a5e8f3bb7d960c73a8f7 Mon Sep 17 00:00:00 2001 From: gOOvER Date: Thu, 16 Feb 2023 16:10:43 +0100 Subject: [PATCH 4/6] protontricks switch to pip --- steamcmd/proton/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/steamcmd/proton/Dockerfile b/steamcmd/proton/Dockerfile index ed5f559..ee9f499 100644 --- a/steamcmd/proton/Dockerfile +++ b/steamcmd/proton/Dockerfile @@ -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 python3-venv pipx +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 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 pipx install protontricks +RUN python3 -m pip install protontricks # Set up Winetricks RUN wget -q -O /usr/sbin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ From dc8d96c0282909d1e007ba9d744ab1a0e3a4e609 Mon Sep 17 00:00:00 2001 From: gOOvER Date: Thu, 16 Feb 2023 16:29:41 +0100 Subject: [PATCH 5/6] Update entrypoint.sh --- steamcmd/entrypoint.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/steamcmd/entrypoint.sh b/steamcmd/entrypoint.sh index a546a4b..87b9f2a 100644 --- a/steamcmd/entrypoint.sh +++ b/steamcmd/entrypoint.sh @@ -40,8 +40,11 @@ if [ -f "/usr/local/bin/proton" ]; then export STEAM_COMPAT_CLIENT_INSTALL_PATH="/home/container/.steam/steam" export STEAM_COMPAT_DATA_PATH="/home/container/.steam/steam/steamapps/compatdata/${SRCDS_APPID}" else - echo -e "No appid set. Stopping server" - exit 1 + echo -e "----------------------------------------------------------------------------------" + echo -e "WARNING!!! Proton needs variable SRCDS_APPID, else it will not work. Please add it" + echo -e "Server stopps now" + echo -e "----------------------------------------------------------------------------------" + exit 0 fi fi From 05bfc8afca9f45fa7c569a04931c6b5db09ef1b6 Mon Sep 17 00:00:00 2001 From: gOOvER Date: Thu, 16 Feb 2023 16:32:27 +0100 Subject: [PATCH 6/6] typo --- steamcmd/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/steamcmd/entrypoint.sh b/steamcmd/entrypoint.sh index 87b9f2a..70965a9 100644 --- a/steamcmd/entrypoint.sh +++ b/steamcmd/entrypoint.sh @@ -42,7 +42,7 @@ if [ -f "/usr/local/bin/proton" ]; then else echo -e "----------------------------------------------------------------------------------" echo -e "WARNING!!! Proton needs variable SRCDS_APPID, else it will not work. Please add it" - echo -e "Server stopps now" + echo -e "Server stops now" echo -e "----------------------------------------------------------------------------------" exit 0 fi