Added siverten/ game server images, a tor image and a utility script
This commit is contained in:
18
siverten/tshock/Dockerfile
Normal file
18
siverten/tshock/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
#FROM mono:slim
|
||||
FROM frolvlad/alpine-mono:latest
|
||||
|
||||
ENV TSHOCK_VERSION=latest
|
||||
#RUN apt -y update && apt -y upgrade &&\
|
||||
# apt install -y wget unzip
|
||||
RUN apk update && apk upgrade &&\
|
||||
apk add curl
|
||||
|
||||
COPY ./start.sh /start
|
||||
COPY ./install.sh /
|
||||
RUN sh /install.sh
|
||||
RUN rm /install.sh
|
||||
|
||||
VOLUME ["/world", "/config", "/logs", "/plugins"]
|
||||
WORKDIR /tshock
|
||||
EXPOSE 7777
|
||||
ENTRYPOINT ["/start"]
|
15
siverten/tshock/install.sh
Executable file
15
siverten/tshock/install.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# tshock install script for docker container
|
||||
get_latest() {
|
||||
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
|
||||
grep '"tag_name":' | # Get tag line
|
||||
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
|
||||
}
|
||||
mkdir /world /config /logs /plugins /tshock
|
||||
cd /tshock
|
||||
[ "$TSHOCK_VERSION" == "latest" ] && TSHOCK_VERSION=`get_latest "Pryaxis/TShock"`
|
||||
wget https://github.com/Pryaxis/TShock/releases/download/$TSHOCK_VERSION/TShock${TSHOCK_VERSION//v}_Terraria1.4.2.3.zip
|
||||
unzip *.zip
|
||||
rm *.zip
|
||||
chmod +x /tshock/TerrariaServer.exe
|
||||
chmod +x /start
|
5
siverten/tshock/start.sh
Executable file
5
siverten/tshock/start.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
# tshock startup script
|
||||
set -e
|
||||
[ "$(ls -A /plugins)" ] && cp -f /plugins/* /tshock/ServerPlugins
|
||||
exec mono --server --gc=sgen -O=all TerrariaServer.exe -configpath /config -worldpath /world -logpath /logs "$@"
|
Reference in New Issue
Block a user