-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (41 loc) · 1.63 KB
/
Dockerfile
File metadata and controls
51 lines (41 loc) · 1.63 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
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM debian:trixie-slim
# Update and install needed utils
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y curl vim zip libicu76 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV DOTNET_ROOT=/root/.dotnet
RUN cd /tmp && \
curl -L https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh && \
chmod +x ./dotnet-install.sh && \
./dotnet-install.sh --channel 6.0 && \
rm -R /tmp/*
# Create symbolic link to ServerLog.txt
RUN mkdir /config /tshock && \
touch /config/ServerLog.txt && \
ln -s /config/ServerLog.txt /tshock/ServerLog.txt && \
rm -rf /config
# fix for favorites.json error
RUN favorites_path="/root/My Games/Terraria" && mkdir -p "$favorites_path" && echo "{}" > "$favorites_path/favorites.json"
RUN cd /tmp && \
curl -sL https://github.com/Pryaxis/TShock/releases/download/v5.2.3/TShock-5.2.3-for-Terraria-1.4.4.9-linux-amd64-Release.zip --output tshock_release.zip && \
unzip tshock_release.zip -d /tmp/tshock && \
cd /tmp/tshock && \
mkdir ./untar && tar -xf *.tar -C ./untar && \
cd $(find . -type f -name TShock.Server -printf '%h\n') && \
mv ./* /tshock/ && \
rm -R /tmp/*
COPY run-tshock.sh /tshock/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="Tshock Terraria Server - Version 5.2.3"
LABEL TSHOCK_VERSION=5.2.3
# Allow for external data
VOLUME ["/config", "/tshock/ServerPlugins"]
# Run the server
WORKDIR /tshock
ENTRYPOINT ["./run.sh"]