-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
88 lines (79 loc) · 3.76 KB
/
Copy pathDockerfile
File metadata and controls
88 lines (79 loc) · 3.76 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
FROM debian:13-slim
ARG CONTAINER_GID=10000
ARG CONTAINER_UID=10000
ENV DEBIAN_FRONTEND="noninteractive"
# Windrose Dedicated Server. Steam app id 4129620. Default bootstrap is
# anonymous SteamCMD (WINDROSE_SERVER_SOURCE=steamcmd, validated on the
# in-cluster canary and on the bare-Linux DO droplet). The UI sidecar
# (see ui/) also accepts uploads for operators running modded / pre-
# release builds (WINDROSE_SERVER_SOURCE=files).
ENV STEAM_APP_ID="4129620"
ENV HOME="/home/steam"
ENV WINDROSE_PATH="/home/steam/windrose"
ENV WINDROSE_SERVER_DIR="${WINDROSE_PATH}/WindowsServer"
# The game process creates/updates its ServerDescription.json under R5/,
# not at the app root. Point our env-mode patcher at that path.
ENV WINDROSE_SERVER_CONFIG="${WINDROSE_SERVER_DIR}/R5/ServerDescription.json"
ENV WINDROSE_SAVE_ROOT="${WINDROSE_SERVER_DIR}/R5/Saved/SaveProfiles/Default/RocksDB"
ENV EXTERNAL_CONFIG="0"
ENV GE_PROTON_VERSION="10-34"
ENV GE_PROTON_URL="https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton${GE_PROTON_VERSION}/GE-Proton${GE_PROTON_VERSION}.tar.gz"
ENV GE_PROTON_SEED_ROOT="/usr/local/share/proton-seed"
ENV STEAMCMD_PATH="/home/steam/steamcmd"
ENV STEAM_SDK64_PATH="/home/steam/.steam/sdk64"
ENV STEAM_SDK32_PATH="/home/steam/.steam/sdk32"
ENV STEAM_COMPAT_CLIENT_INSTALL_PATH="$STEAMCMD_PATH"
ENV STEAM_COMPAT_DATA_PATH="${STEAMCMD_PATH}/steamapps/compatdata/${STEAM_APP_ID}"
ENV UMU_ID="0"
RUN groupadd -g $CONTAINER_GID steam \
&& useradd -g $CONTAINER_GID -u $CONTAINER_UID -m steam \
&& dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install --no-install-recommends -y \
procps \
ca-certificates \
winbind \
dbus \
libfreetype6 \
libgnutls30 \
xvfb \
curl \
jq \
tar \
gzip \
locales \
lib32gcc-s1 \
python3 \
&& echo 'LANG="en_US.UTF-8"' > /etc/default/locale \
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen \
&& rm -f /etc/machine-id \
&& dbus-uuidgen --ensure=/etc/machine-id \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p "${GE_PROTON_SEED_ROOT}" \
&& echo "Baking GE-Proton${GE_PROTON_VERSION} into image seed cache..." \
&& curl -fsSL "${GE_PROTON_URL}" | tar zxf - -C "${GE_PROTON_SEED_ROOT}"
COPY --chmod=755 scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
COPY scripts/ServerDescription_example.json /usr/local/share/ServerDescription_example.json
COPY scripts/WorldDescription_example.json /usr/local/share/WorldDescription_example.json
# Optional idle-CPU patch — off by default, opt in with
# WINDROSE_PATCH_IDLE_CPU=1. The entrypoint only invokes it when set.
COPY --chmod=755 scripts/patch-idle-cpu.py /usr/local/bin/patch-idle-cpu.py
COPY --chmod=755 scripts/reconcile-engine-ini.sh /usr/local/bin/reconcile-engine-ini.sh
# Admin console (stdlib Python HTTP server + static assets). Baked into
# the same image as the game binary; the UI sidecar runs via a command
# override at /opt/windrose-ui/server.py. Backend lives at the repo
# root (server.py); frontend bundle is the sibling ui/ tree.
COPY --chown=10000:10000 server.py /opt/windrose-ui/server.py
COPY --chown=10000:10000 metrics.py /opt/windrose-ui/metrics.py
COPY --chown=10000:10000 ui/ /opt/windrose-ui/ui/
RUN chmod 755 /opt/windrose-ui/server.py /opt/windrose-ui/metrics.py
USER steam
RUN mkdir -p "$WINDROSE_PATH" \
&& mkdir -p "${STEAMCMD_PATH}/compatibilitytools.d" \
&& mkdir -p "${STEAMCMD_PATH}/steamapps/compatdata/${STEAM_APP_ID}" \
&& mkdir -p /home/steam/.steam
WORKDIR /home/steam
# The entrypoint `exec`s Proton as its final step, so Proton becomes PID 1
# (replacing bash) and handles its own signals. No init shim needed.
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]