Created
March 21, 2017 03:47
-
-
Save Xanir/7cb13294223fd3b54b81d66772b23278 to your computer and use it in GitHub Desktop.
Terraria Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.10 | |
# Download and install TShock | |
ENV TSHOCK_VERSION=4.3.23 \ | |
TSHOCK_FILE_POSTFIX="" | |
# Add mono repository | |
# Update and install mono and a zip utility | |
# fix for favorites.json error | |
RUN apt-get update && \ | |
apt-get install -y dirmngr && \ | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \ | |
echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list && \ | |
apt-get update && \ | |
apt-get install -y mono-complete && \ | |
favorites_path="/root/My Games/Terraria" && mkdir -p "$favorites_path" && echo "{}" > "$favorites_path/favorites.json" | |
RUN apt-get update && \ | |
apt-get install -y curl zip && \ | |
mkdir /var/tshock && \ | |
cd /var/tshock && \ | |
curl -L -o tshock.zip https://github.com/NyxStudios/TShock/releases/download/v$TSHOCK_VERSION/tshock_$TSHOCK_VERSION.zip && \ | |
unzip tshock.zip -d /var/tshock && \ | |
rm tshock.zip && \ | |
chmod 777 /var/tshock/TerrariaServer.exe | |
# Allow for external data | |
VOLUME ["/world", "/var/tshock/ServerPlugins"] | |
# Set working directory to server | |
WORKDIR /var/tshock | |
# run the server | |
ENTRYPOINT ["mono", "--server", "--gc=sgen", "-O=all", "TerrariaServer.exe", "-configpath", "/world", "-worldpath", "/world", "-world", "world.wld", "-autocreate", "3", "-port", "7777", "-logpath", "/world"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment