Skip to content

Commit d0f0622

Browse files
committed
defensive fix for permission issue
1 parent d70627e commit d0f0622

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

dockerfile.native

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ USER 5k
1212
RUN mkdir -p "${STEAMPATH}" "${SRVPATH}" && cd "${STEAMPATH}" && \
1313
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
1414

15-
CMD "${STEAMPATH}/steamcmd.sh" @ShutdownOnFailedCommand @NoPromptForPassword +login anonymous +app_update ${APPID} +'quit' && \
16-
cd "${SRVPATH}" && ./LinuxServer/PandemicServer.sh ${ARGS}
15+
USER root
16+
CMD chown -R 5k:5k "${SRVPATH}" && su 5k -c' \
17+
"${STEAMPATH}/steamcmd.sh" @ShutdownOnFailedCommand @NoPromptForPassword +login anonymous +app_update ${APPID} +quit && \
18+
cd "${SRVPATH}" && ./LinuxServer/PandemicServer.sh ${ARGS}'

dockerfile.wine

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ RUN dpkg --add-architecture i386 && \
1717
mkdir -pm755 /etc/apt/keyrings && \
1818
curl -so /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key && \
1919
curl -so /etc/apt/sources.list.d/winehq-trixie.sources https://dl.winehq.org/wine-builds/debian/dists/trixie/winehq-trixie.sources && \
20-
apt-get update && apt-get install -y --install-recommends winehq-staging && \
20+
apt-get update && apt-get install -y --install-recommends winehq-staging xvfb && \
2121
rm -rf /var/lib/apt/lists/* && apt-get clean
2222

2323
ENV STARTENV="WINEDLLOVERRIDES=dwmapi=native,builtin"
24-
ENV STARTCMD="wine ./WindowsServer/PandemicServer.exe"
24+
ENV STARTCMD="xvfb-run wine ./WindowsServer/PandemicServer.exe"
2525

26-
USER 5k
27-
CMD "${STEAMPATH}/steamcmd.sh" @ShutdownOnFailedCommand @NoPromptForPassword +@sSteamCmdForcePlatformType windows +login anonymous +app_update ${APPID} +'quit' && \
28-
cd "${SRVPATH}" && if [ -n "${STARTENV}" ]; then export ${STARTENV} && ${STARTCMD} ${ARGS}; else ${STARTCMD} ${ARGS}; fi
26+
CMD chown -R 5k:5k "${SRVPATH}" && su 5k -c' \
27+
"${STEAMPATH}/steamcmd.sh" @ShutdownOnFailedCommand @NoPromptForPassword +@sSteamCmdForcePlatformType windows +login anonymous +app_update ${APPID} +quit && \
28+
cd "${SRVPATH}" && if [ -n "${STARTENV}" ]; then export ${STARTENV} && ${STARTCMD} ${ARGS}; else ${STARTCMD} ${ARGS}; fi'

0 commit comments

Comments
 (0)