fix: specify steam user outside RUN

This commit is contained in:
Price Hiller 2024-07-17 04:01:46 -05:00
parent 9b2892436e
commit f7138afac6
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -25,7 +25,6 @@ ENV GAMEPORT=7787 \
SHELL [ "/bin/bash", "-c" ] SHELL [ "/bin/bash", "-c" ]
RUN <<__EOR__ RUN <<__EOR__
apt-get update apt-get update
apt-get install -y --no-install-suggests --no-install-recommends \ apt-get install -y --no-install-suggests --no-install-recommends \
@ -34,11 +33,14 @@ apt-get install -y --no-install-suggests --no-install-recommends \
gnupg=2.2.40-1.1 gnupg=2.2.40-1.1
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
__EOR__
# HACK: Hard coding the user to be "steam" is not great, but I'm too lazy to really do this the # HACK: Hard coding the user to be "steam" is not great, but I'm too lazy to really do this the
# *right* way (which is making sure the USER ends up as steam via an entry point up in the steamcmd # *right* way (which is making sure the USER ends up as steam via an entry point up in the steamcmd
# image). For now, this will have to do. # image). For now, this will have to do.
su steam -c "/bin/bash" <<-__EOS__ USER steam
RUN <<__EOR__
if (( use_squad_beta == 1 )); then if (( use_squad_beta == 1 )); then
# Install Squad from the Beta branch # Install Squad from the Beta branch
"${STEAM_CMD_INSTALL_DIR}/steamcmd.sh" \ "${STEAM_CMD_INSTALL_DIR}/steamcmd.sh" \
@ -56,8 +58,6 @@ else
+app_update ${steam_app_id} validate \ +app_update ${steam_app_id} validate \
+quit +quit
fi fi
__EOS__
__EOR__ __EOR__
FROM build-squad AS mods FROM build-squad AS mods