-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (31 loc) · 1.27 KB
/
Dockerfile
File metadata and controls
38 lines (31 loc) · 1.27 KB
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
FROM debian:trixie-slim
# Update and install needed utils
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y curl vim zip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# fix for favorites.json error
RUN favorites_path="/root/My Games/Terraria" && mkdir -p "$favorites_path" && echo "{}" > "$favorites_path/favorites.json"
RUN mkdir /tmp/terraria && \
cd /tmp/terraria && \
curl -sL https://www.terraria.org/api/download/pc-dedicated-server/terraria-server-1423.zip --output terraria-server.zip && \
unzip -q terraria-server.zip && \
mv */Linux /vanilla && \
mv */Windows/serverconfig.txt /vanilla/serverconfig-default.txt && \
rm -R /tmp/* && \
chmod +x /vanilla/TerrariaServer* && \
if [ ! -f /vanilla/TerrariaServer ]; then echo "Missing /vanilla/TerrariaServer"; exit 1; fi
COPY run-vanilla.sh /vanilla/run.sh
# Metadata
ARG VCS_REF
LABEL org.opencontainers.image.revision=$VCS_REF
LABEL org.opencontainers.image.source="https://github.com/beardedio/terraria"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.description="Vanilla Terraria Server - Version 1423"
LABEL VANILLA_VERSION=1423
# Allow for external data
VOLUME ["/config"]
# Run the server
WORKDIR /vanilla
ENTRYPOINT ["./run.sh"]