diff --git a/Dockerfile b/Dockerfile index c53effd..8e1c02e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,19 +16,15 @@ ENV TEAMSPEAK_URL http://dl.4players.de/ts/releases/3.0.10.3/teamspeak3-server_l VOLUME ["/teamspeak3"] # Update app-get index and install curl to download TS3 file. -RUN apt-get update && apt-get install -y curl +#RUN apt-get update && apt-get install -y curl # Download TS3 file and extract it into /opt. -RUN cd /opt && curl -sL ${TEAMSPEAK_URL} | tar xz +#RUN cd /opt && curl -sL ${TEAMSPEAK_URL} | tar xz +ADD ${TEAMSPEAK_URL} /opt/ +ADD /scripts/ /opt/scripts/ -ENTRYPOINT /opt/teamspeak3-server_linux-amd64/ts3server_minimal_runscript.sh \ - query_ip_whitelist="/teamspeak3/query_ip_whitelist.txt" \ - query_ip_backlist="/teamspeak3/query_ip_blacklist.txt" \ - logpath="/teamspeak3/logs/" \ - licensepath="/teamspeak3/" -# inifile="/teamspeak3/ts3server.ini" \ -# createinifile=1 - +ENTRYPOINT ["/opt/scripts/dev_ts3server"] +#CMD ["-w", "/teamspeak3/query_ip_whitelist.txt", "-b", "/teamspeak3/query_ip_blacklist.txt", "-o", "/teamspeak3/logs/", "-l", "/teamspeak3/"] # Expose the Standard TS3 port. EXPOSE 9987/udp diff --git a/scripts/docker-ts3.sh b/scripts/docker-ts3.sh new file mode 100644 index 0000000..59d4aaa --- /dev/null +++ b/scripts/docker-ts3.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +VOLUME=/teamspeak3/ + +#-- ts 3 starten im hintergrund +#-- den erstellten files ordner symlinken +#-- die erstelle ts3 db symlinken + +echo "This scripts checks the existence of the ts3server.sqlitedb." +echo "Checking..." +if [ -f $VOLUME/ts3server.sqlitedb ] + then + echo "$VOLUME/ts3server.sqlitedb exists." + echo "Creating link." + ln -s $VOLUME/ts3server.sqlitedb /opt/teamspeak3-server_linux-amd64/ts3server.sqlitedb +fi + + +/opt/teamspeak3-server_linux-amd64/ts3server_minimal_runscript.sh \ + query_ip_whitelist="/teamspeak3/query_ip_whitelist.txt" \ + query_ip_backlist="/teamspeak3/query_ip_blacklist.txt" \ + logpath="/teamspeak3/logs/" \ + licensepath="/teamspeak3/" +# inifile="/teamspeak3/ts3server.ini" \ +# createinifile=1 + +#ln -s /opt/teamspeak3-server_linux-amd64/files/ /teamspeak3/files/ +