-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (40 loc) · 2.12 KB
/
Dockerfile
File metadata and controls
48 lines (40 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM golang:1.26.0-trixie AS tools-builder
COPY patcher patcher
RUN go build -C patcher
COPY healthcheck healthcheck
RUN go build -C healthcheck
FROM ubuntu:24.04
ARG DEBIAN_FRONTEND="noninteractive"
RUN userdel ubuntu && useradd -m -u 1000 steam && \
echo steam steam/question select "I AGREE" | debconf-set-selections && \
echo steam steam/license note '' | debconf-set-selections && \
apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y wget software-properties-common && \
dpkg --add-architecture i386 && \
mkdir -pm755 /etc/apt/keyrings && \
wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key && \
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/noble/winehq-noble.sources && \
wget -O /usr/local/bin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks && \
chmod +x /usr/local/bin/winetricks && \
apt-get update -y && \
apt-get install -y --no-install-recommends steamcmd xvfb cabextract winehq-stable gosu && \
mkdir /wineprefix-template && chown steam:steam /wineprefix-template && \
runuser -l steam -c "WINEPREFIX=/wineprefix-template winecfg" && \
sleep 5 && \
runuser -l steam -c "WINEPREFIX=/wineprefix-template xvfb-run winetricks -q vcrun2022" && \
rm -f /usr/local/bin/winetricks && \
apt-get remove -y --purge wget xvfb cabextract software-properties-common && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
RUN date -u +%Y%m%dT%H%M%SZ > /wineprefix-template/.timestamp
RUN ln -s /usr/games/steamcmd /usr/bin/steamcmd
VOLUME /server
VOLUME /wineprefix-volume
COPY --from=tools-builder /go/patcher/patcher /usr/local/bin/patcher
COPY --from=tools-builder /go/healthcheck/healthcheck /usr/local/bin/healthcheck
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh && chmod +x /usr/local/bin/patcher && chmod +x /usr/local/bin/healthcheck
HEALTHCHECK --interval=1m --timeout=10s --start-period=5m --start-interval=15s --retries=2 CMD healthcheck localhost:7777
CMD ["/entrypoint.sh"]