-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Dockerfile.j2
29 lines (23 loc) · 990 Bytes
/
Dockerfile.j2
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
#
# LinuxGSM {{ gamename }} Dockerfile
#
# https://github.com/GameServerManagers/docker-gameserver
#
FROM gameservermanagers/linuxgsm:{{ distro }}
LABEL maintainer="LinuxGSM <me@danielgibbs.co.uk>"
ARG SHORTNAME={{ shortname }}
ENV GAMESERVER={{ shortname }}server
WORKDIR /app
## Auto install game server requirements
RUN depshortname=$(curl --connect-timeout 10 -s https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/lgsm/data/{{ distro }}.csv |awk -v shortname="{{ shortname }}" -F, '$1==shortname {$1=""; print $0}') \
&& if [ -n "${depshortname}" ]; then \
echo "**** Install ${depshortname} ****" \
&& apt-get update \
&& apt-get install -y ${depshortname} \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*; \
fi
HEALTHCHECK --interval=1m --timeout=1m --start-period=2m --retries=1 CMD /app/entrypoint-healthcheck.sh || exit 1
RUN date > /build-time.txt
ENTRYPOINT ["/bin/bash", "./entrypoint.sh"]