Skip to content

Commit 3a92f39

Browse files
authored
fix: preserve steamcmd sdk libraries (#85)
1 parent ac0a896 commit 3a92f39

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Dockerfile.steamcmd

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ ARG VERSION=latest
22
FROM artifacts.druid.gg/druid-team/druid:${VERSION} AS base
33
FROM gameservermanagers/steamcmd:ubuntu-24.04
44

5+
RUN mkdir -p /tmp/steamcmd-seed/linux32 /tmp/steamcmd-seed/linux64 && \
6+
cp /home/steam/.local/share/Steam/steamcmd/linux32/steamclient.so /tmp/steamcmd-seed/linux32/steamclient.so && \
7+
cp /home/steam/.local/share/Steam/steamcmd/linux64/steamclient.so /tmp/steamcmd-seed/linux64/steamclient.so && \
8+
test -s /tmp/steamcmd-seed/linux32/steamclient.so && \
9+
test -s /tmp/steamcmd-seed/linux64/steamclient.so
10+
511
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
612

713
COPY --from=base /usr/bin/druid* /usr/bin/
@@ -47,6 +53,22 @@ ARG GID=1000
4753
RUN groupadd -g $GID -o druid
4854
RUN useradd -m -u $UID -g $GID -o -s /bin/bash druid
4955

56+
RUN mkdir -p \
57+
/home/druid/.local/share/Steam/steamcmd/linux32 \
58+
/home/druid/.local/share/Steam/steamcmd/linux64 \
59+
/home/druid/.steam/sdk32 \
60+
/home/druid/.steam/sdk64 && \
61+
cp /tmp/steamcmd-seed/linux32/steamclient.so /home/druid/.local/share/Steam/steamcmd/linux32/steamclient.so && \
62+
cp /tmp/steamcmd-seed/linux64/steamclient.so /home/druid/.local/share/Steam/steamcmd/linux64/steamclient.so && \
63+
ln -sfn /home/druid/.local/share/Steam /home/druid/.steam/root && \
64+
ln -sfn /home/druid/.local/share/Steam /home/druid/.steam/steam && \
65+
ln -sfn /home/druid/.local/share/Steam/steamcmd/linux32/steamclient.so /home/druid/.steam/sdk32/steamclient.so && \
66+
ln -sfn /home/druid/.local/share/Steam/steamcmd/linux64/steamclient.so /home/druid/.steam/sdk64/steamclient.so && \
67+
chown -R druid:druid /home/druid/.local /home/druid/.steam && \
68+
rm -rf /tmp/steamcmd-seed
69+
70+
WORKDIR /home/druid
71+
5072
USER druid
5173

5274
# backward compatibility for lgsm scrolls, please clean this up, but otherwise configs are not found for lgsm!

0 commit comments

Comments
 (0)