-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.steamcmd
More file actions
82 lines (71 loc) · 2.78 KB
/
Copy pathDockerfile.steamcmd
File metadata and controls
82 lines (71 loc) · 2.78 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
ARG VERSION=latest
FROM artifacts.druid.gg/druid-team/druid:${VERSION} AS base
FROM gameservermanagers/steamcmd:ubuntu-24.04
RUN mkdir -p /tmp/steamcmd-seed && \
cp -a /home/steam/.local/share/Steam/steamcmd /tmp/steamcmd-seed/steamcmd && \
test -s /tmp/steamcmd-seed/steamcmd/steamcmd.sh && \
test -s /tmp/steamcmd-seed/steamcmd/linux32/steamclient.so && \
test -s /tmp/steamcmd-seed/steamcmd/linux64/steamclient.so
RUN if id -u steam >/dev/null 2>&1; then echo "Removing steam user from base image"; userdel -r steam || true; else echo "steam user not present"; fi
COPY --from=base /usr/bin/druid* /usr/bin/
COPY --from=base /entrypoint.sh /entrypoint.sh
RUN mkdir -p /usr/share/man/man1 && \
DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
bc \
binutils \
bsdmainutils \
bzip2 \
ca-certificates \
cpio \
curl \
distro-info \
expect \
file \
iproute2 \
jq \
lib32stdc++6 \
libxml2-utils \
moreutils \
netcat-openbsd \
openjdk-21-jre-headless \
pigz \
python3 \
rng-tools5 \
telnet \
tmux \
unzip \
uuid-runtime \
wget \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then YQ_ARCH="amd64"; \
elif [ "$ARCH" = "aarch64" ]; then YQ_ARCH="arm64"; \
else YQ_ARCH="$ARCH"; fi && \
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${YQ_ARCH} -O /usr/bin/yq && \
chmod +x /usr/bin/yq
# Set up user with the same UID/GID
ARG UID=1000
ARG GID=1000
RUN groupadd -g $GID -o druid
RUN useradd -m -u $UID -g $GID -o -s /bin/bash druid
RUN mkdir -p \
/home/druid/.local/share/Steam \
/home/druid/.steam/sdk32 \
/home/druid/.steam/sdk64 && \
cp -a /tmp/steamcmd-seed/steamcmd /home/druid/.local/share/Steam/steamcmd && \
ln -sfn /home/druid/.local/share/Steam /home/druid/.steam/root && \
ln -sfn /home/druid/.local/share/Steam /home/druid/.steam/steam && \
ln -sfn /home/druid/.local/share/Steam/steamcmd/linux32/steamclient.so /home/druid/.steam/sdk32/steamclient.so && \
ln -sfn /home/druid/.local/share/Steam/steamcmd/linux64/steamclient.so /home/druid/.steam/sdk64/steamclient.so && \
chown -R druid:druid /home/druid/.local /home/druid/.steam && \
rm -rf /tmp/steamcmd-seed
WORKDIR /home/druid
USER druid
# backward compatibility for lgsm scrolls, please clean this up, but otherwise configs are not found for lgsm!
# removed now, as this image should be universal, but kept for reference
#ENV LGSM_SERVERFILES=/app/resources/deployment/serverfiles
#ENV LGSM_CONFIG=/app/resources/deployment/config-lgsm
#ENV LGSM_LOGDIR=/app/resources/deployment/log
#ENV LGSM_DATADIR=/app/resources/deployment/data
ENTRYPOINT [ "/entrypoint.sh" ]