This repository has been archived on 2021-12-24. You can view files and clone it, but cannot push or open issues/pull-requests.
2021-12-24 09:04:56 +01:00
|
|
|
FROM alpine:3.15.0 AS base
|
2020-12-30 15:13:22 +01:00
|
|
|
|
|
|
|
# Build arguments
|
|
|
|
ARG RELEASE_TAG
|
|
|
|
|
|
|
|
WORKDIR /terraria
|
|
|
|
|
2021-04-23 15:16:51 +02:00
|
|
|
RUN apk update && apk add --no-cache unzip curl && \
|
|
|
|
curl -s "https://api.github.com/repos/Pryaxis/TShock/releases/tags/${RELEASE_TAG}" | \
|
|
|
|
grep "browser_download_url" | \
|
|
|
|
grep -o "https[^\"]\+" | \
|
|
|
|
xargs curl -sLo tshock.zip && \
|
|
|
|
unzip -d tshock tshock.zip && \
|
|
|
|
rm tshock.zip
|
2020-12-30 15:13:22 +01:00
|
|
|
|
|
|
|
|
2021-04-23 15:16:51 +02:00
|
|
|
FROM mono:6.12.0.107
|
2020-12-30 15:13:22 +01:00
|
|
|
WORKDIR /terraria
|
|
|
|
|
|
|
|
COPY --from=base /terraria/tshock /terraria
|
|
|
|
|
|
|
|
# Create worlds directory & symlink it
|
|
|
|
RUN mkdir -p worlds logs config /root/.local/share/Terraria && \
|
2021-04-23 15:16:51 +02:00
|
|
|
ln -s /terraria/worlds /root/.local/share/Terraria/Worlds
|
2020-12-30 15:13:22 +01:00
|
|
|
|
|
|
|
ENTRYPOINT \
|
|
|
|
mono /terraria/TerrariaServer.exe \
|
|
|
|
-configpath /terraria/config \
|
|
|
|
-logpath /terraria/logs \
|
|
|
|
-autocreate "$AUTOCREATE" \
|
|
|
|
-world /terraria/worlds/Main.wld
|