mirror of
https://github.com/AsgardEternal/SquadDocker.git
synced 2024-09-28 11:44:22 -05:00
feat: better support for mounts
This commit is contained in:
parent
3ad9e0f92b
commit
068e3ab48d
25
Dockerfile
25
Dockerfile
@ -1,7 +1,7 @@
|
|||||||
# syntax=docker/dockerfile:1.4
|
# syntax=docker/dockerfile:1.4
|
||||||
FROM asgard.orion-technologies.io/steamcmd:1.0 AS build
|
FROM asgard.orion-technologies.io/steamcmd:1.0 AS build
|
||||||
|
|
||||||
LABEL maintainer="price@orion-technologies.io"
|
LABEL maintainer="price@orion-technologies.io"
|
||||||
|
USER root
|
||||||
|
|
||||||
ARG steam_app_id=403240
|
ARG steam_app_id=403240
|
||||||
ARG steam_beta_app_id=774961
|
ARG steam_beta_app_id=774961
|
||||||
@ -21,10 +21,14 @@ ENV GAMEPORT=7787 \
|
|||||||
FIXEDMAXTICKRATE=40 \
|
FIXEDMAXTICKRATE=40 \
|
||||||
RANDOM=NONE
|
RANDOM=NONE
|
||||||
|
|
||||||
|
COPY --chown=${USER} ./scripts/entry.sh "${USER_HOME}/entry.sh"
|
||||||
|
|
||||||
SHELL [ "/bin/bash", "-c" ]
|
SHELL [ "/bin/bash", "-c" ]
|
||||||
|
|
||||||
RUN <<__EOR__
|
RUN <<__EOR__
|
||||||
|
|
||||||
|
chmod 0744 "${USER_HOME}/entry.sh"
|
||||||
|
|
||||||
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" \
|
||||||
@ -57,15 +61,26 @@ for mod in "${squad_mods[@]}"; do
|
|||||||
"${SQUAD_SERVER_DIR}/SquadGame/Plugins/Mods/${mod}"
|
"${SQUAD_SERVER_DIR}/SquadGame/Plugins/Mods/${mod}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
rm -rf "${SQUAD_SERVER_DIR}/SquadGame/ServerConfig"
|
||||||
|
mkdir -p /ServerConfig
|
||||||
|
ln -s /ServerConfig "${SQUAD_SERVER_DIR}/SquadGame/ServerConfig"
|
||||||
|
chown -R "${USER}:${USER}" /ServerConfig
|
||||||
|
chmod -R 0744 /ServerConfig
|
||||||
|
|
||||||
|
|
||||||
__EOR__
|
__EOR__
|
||||||
|
|
||||||
|
USER "${USER}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
FROM build AS prod
|
||||||
|
USER "${USER}"
|
||||||
|
WORKDIR "${USER_HOME}"
|
||||||
|
CMD [ "/bin/bash", "entry.sh" ]
|
||||||
|
|
||||||
EXPOSE ${GAMEPORT}/udp \
|
EXPOSE ${GAMEPORT}/udp \
|
||||||
${QUERYPORT}/tcp \
|
${QUERYPORT}/tcp \
|
||||||
${QUERYPORT}/udp \
|
${QUERYPORT}/udp \
|
||||||
${RCONPORT}/tcp \
|
${RCONPORT}/tcp \
|
||||||
${RCONPORT}/udp
|
${RCONPORT}/udp
|
||||||
|
|
||||||
COPY ./scripts/entry.sh "/entry.sh"
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/bin/bash", "/entry.sh" ]
|
|
||||||
|
0
scripts/entry.sh
Normal file → Executable file
0
scripts/entry.sh
Normal file → Executable file
Loading…
Reference in New Issue
Block a user