-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (28 loc) · 1019 Bytes
/
Dockerfile
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
#####################################################################
# Dockerfile that builds a FoF Gameserver - modified from CS Scrim #
#####################################################################
FROM cm2network/steamcmd:root
ENV STEAMAPPID 295230
ENV STEAMAPP fof
ENV STEAMAPPDIR "${HOMEDIR}/${STEAMAPP}-dedicated"
COPY entry.sh ${HOMEDIR}/entry.sh
RUN set -x \
&& mkdir -p "${STEAMAPPDIR}" \
&& { \
echo '@ShutdownOnFailedCommand 1'; \
echo '@NoPromptForPassword 1'; \
echo 'login anonymous'; \
echo 'force_install_dir '"${STEAMAPPDIR}"''; \
echo 'app_update '"${STEAMAPPID}"''; \
echo 'quit'; \
} > "${HOMEDIR}/${STEAMAPP}_update.txt" \
&& chmod +x "${HOMEDIR}/entry.sh" \
&& chown -R "${USER}:${USER}" "${HOMEDIR}/entry.sh" "${STEAMAPPDIR}" "${HOMEDIR}/${STEAMAPP}_update.txt" \
&& rm -rf /var/lib/apt/lists/*
ENV SRCDS_PORT=27015
ENV SRCDS_TOKEN=0
USER ${USER}
VOLUME ${STEAMAPPDIR}
WORKDIR ${HOMEDIR}
EXPOSE ${SRCDS_PORT}/udp ${SRCDS_PORT}/tcp
CMD ["bash", "entry.sh"]