-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
51 lines (38 loc) · 1.28 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM docker.io/alpine:latest
# VERSION comes from the main.yml workflow --build-arg
ARG VERSION
RUN apk add --no-cache bash grep curl unzip icu-dev tmux jq netcat-openbsd
RUN mkdir -p /opt/tmodloader/server/ &&\
mkdir -p /opt/tmodloader/config/ModPacks &&\
mkdir -p /opt/tmodloader/config/Worlds
COPY scripts/entrypoint.sh /opt/tmodloader/
COPY scripts/variables.sh /opt/tmodloader/
COPY scripts/inject.sh /usr/local/bin/inject
RUN chmod -R 755 /opt/tmodloader/ &&\
chmod +x /opt/tmodloader/entrypoint.sh &&\
chmod 755 /usr/local/bin/inject
WORKDIR /opt/tmodloader/server/
RUN curl -Lo ./tModLoader.zip https://github.com/tModLoader/tModLoader/releases/download/v${VERSION}/tModLoader.zip &&\
unzip -o ./tModLoader.zip &&\
rm ./tModLoader.zip &&\
rm ./serverconfig.txt
RUN chmod +x ./start-tModLoaderServer.sh
ENV VERSION=$VERSION
ENV SERVERCONFIG="0"
ENV AUTOCREATE="2"
ENV DIFFICULTY="0"
ENV BANLIST="banlist.txt"
ENV LANGUAGE="en-US"
ENV MAXPLAYERS="8"
ENV MODPACK=""
ENV MOTD=""
ENV NPCSTREAM="15"
ENV PASSWORD=""
ENV PORT="7777"
ENV PRIORITY="1"
ENV SECURE="1"
ENV SEED=""
ENV UPNP="0"
ENV WORLDNAME="World"
ENTRYPOINT ["/opt/tmodloader/entrypoint.sh"]
HEALTHCHECK --interval=15s --timeout=5s --start-period=10s --retries=3 CMD nc -vz 127.0.0.1 7777 || exit 1