Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: cleanup deps & added multistage build for proton container #111

Merged
merged 1 commit into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ LABEL maintainer="[email protected]"
# Install prerequisites
RUN apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
cabextract \
curl \
winbind \
supervisor \
cron \
rsyslog \
jq \
lsof \
zip \
python3 \
python3-pip \
Expand Down
43 changes: 27 additions & 16 deletions dockerfiles/proton.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,43 @@
FROM steamcmd/steamcmd:ubuntu-24@sha256:1314c2ee778d3b7349a42b90745d688689e9a317dc405680be10e3cb537c9a85
LABEL maintainer="[email protected]"
FROM steamcmd/steamcmd:ubuntu-24@sha256:1314c2ee778d3b7349a42b90745d688689e9a317dc405680be10e3cb537c9a85 as builder

Check warning on line 1 in dockerfiles/proton.Dockerfile

View workflow job for this annotation

GitHub Actions / build-proton / Docker Build & Push

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 1 in dockerfiles/proton.Dockerfile

View workflow job for this annotation

GitHub Actions / build-proton / Docker Build & Push

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

ARG GE_PROTON_VERSION="9-18"
ARG GE_PROTON_VERSION="9-19"

# Install prerequisites
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
cabextract \
curl \
winbind \
tar \
dbus \
&& apt autoremove --purge && apt clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# install proton
RUN curl -sLOJ "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton${GE_PROTON_VERSION}/GE-Proton${GE_PROTON_VERSION}.tar.gz" \
&& mkdir -p /tmp/proton \
&& tar -xzf GE-Proton*.tar.gz -C /tmp/proton --strip-components=1 \
&& rm GE-Proton*.* \
&& rm -f /etc/machine-id \
&& dbus-uuidgen --ensure=/etc/machine-id


FROM steamcmd/steamcmd:ubuntu-24@sha256:1314c2ee778d3b7349a42b90745d688689e9a317dc405680be10e3cb537c9a85
LABEL maintainer="[email protected]"

# Install dependencies
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
curl \
supervisor \
cron \
rsyslog \
jq \
lsof \
zip \
python3 \
python3-pip \
tar \
dbus \
libfreetype6 \
libfreetype6:i386 \
gnutls-bin \
&& apt autoremove --purge && apt clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand All @@ -31,13 +46,6 @@
&& chmod +x /tmp/winetricks && install -m 755 /tmp/winetricks /usr/local/bin/winetricks \
&& rm -rf /tmp/*

# install proton
RUN curl -sLOJ "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton${GE_PROTON_VERSION}/GE-Proton${GE_PROTON_VERSION}.tar.gz" \
&& tar -xzf GE-Proton*.tar.gz -C /usr/local/bin/ --strip-components=1 \
&& rm GE-Proton*.* \
&& rm -f /etc/machine-id \
&& dbus-uuidgen --ensure=/etc/machine-id

# MISC
RUN mkdir -p /usr/local/etc /var/log/supervisor /var/run/enshrouded /usr/local/etc/supervisor/conf.d/ /opt/enshrouded /home/enshrouded/.steam/sdk32 /home/enshrouded/.steam/sdk64 \
&& groupadd -g "${PGID:-4711}" -o enshrouded \
Expand All @@ -47,6 +55,9 @@
&& sed -i '/imklog/s/^/#/' /etc/rsyslog.conf \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=builder /tmp/proton /usr/local/bin
COPY --from=builder /etc/machine-id /etc/machine-id

COPY ../supervisord.conf /etc/supervisor/supervisord.conf
COPY --chmod=755 ../scripts/default/* ../scripts/proton/* /usr/local/etc/enshrouded/

Expand Down