-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.save
83 lines (68 loc) · 1.77 KB
/
Dockerfile.save
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
FROM silentmecha/steamcmd:latest
LABEL maintainer="silent@silentmecha.co.za"
ENV STEAMAPP_ID 294420
ENV STEAMAPP 7DaysToDie
ENV STEAMAPPDIR "${HOME}/${STEAMAPP}-dedicated"
ENV STEAM_SAVEDIR "${HOME}/.local/share/7DaysToDie"
USER root
COPY ./src/entry.sh ${HOME}/entry.sh
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
xmlstarlet \
telnet \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
RUN set -x \
&& mkdir -p "${STEAMAPPDIR}" \
&& mkdir -p "${STEAM_SAVEDIR}" \
&& chmod +x "${HOME}/entry.sh" \
&& chown -R "${USER}:${USER}" "${HOME}/entry.sh" "${STEAMAPPDIR}" "${STEAM_SAVEDIR}" \
&& chmod -R 744 "${STEAM_SAVEDIR}"
ENV SERVERNAME=ServerName \
SERVERPORT=26900 \
SERVERPORT_1=26901 \
SERVERPORT_2=26902 \
SERVERVISIBILITY=2 \
SERVERPASSWORD= \
SERVERMAXPLAYERCOUNT=8 \
SERVERRESERVEDSLOTS=0 \
SERVERADMINSLOTS=0 \
SERVERDESCRIPTION="A 7 Days to Die server running inside of docker" \
SERVERWEBSITEURL= \
EACENABLED=true \
GAMEWORLD=Navezgane \
GAMENAME="My Game" \
WORLDGENSEED="asdf" \
WORLDGENSIZE=4096 \
PLAYERKILLINGMODE=3 \
CONTROLPANELPORT=8080 \
CONTROLPANELENABLED=true \
CONTROLPANELPASSWORD="CHANGEME" \
TELNETENABLED=true \
TELNETPORT=8081 \
TELNETPASSWORD= \
ADDITIONAL_ARGS=
# Switch to user
USER ${USER}
RUN bash steamcmd \
+@sSteamCmdForcePlatformType \
+login anonymous \
+force_install_dir "${STEAMAPPDIR}" \
+app_update "${STEAMAPP_ID}" validate \
+quit
VOLUME ${STEAM_SAVEDIR}
WORKDIR ${HOME}
EXPOSE 8081/tcp \
8080/tcp \
26900/tcp \
26900/udp \
26901/udp \
26902/udp
# EXPOSE ${TELNETPORT}/tcp \
# ${CONTROLPANELPORT}/tcp \
# ${SERVERPORT}/tcp \
# ${SERVERPORT}/udp \
# 26901/udp \
# 26902/udp
CMD ["bash", "entry.sh"]