Dockerfile teamspeak server crack

S8N

New Member
Mar 18, 2017
4
2
15
Hi,

I just created a docker image of the "TeamSpeak Server Crack 3.0.13.8 with Accounting Emulator",
currently being tested,
it's been 1 hour since ts has been running without a bug

You can find it here:
https://hub.docker.com/r/s8n02/ts3server/

I'm not thinking of updating that image, it was just a test,
so you will find below the dockerfile to be able to create another image more easily.

Here is the dockerfile :
Code:
FROM ubuntu:18.04
# setup directory where user data is stored
VOLUME ["/home/ts3/data/"]
WORKDIR /home/ts3/data/
ENV TEAMSPEAK_URL https://www.dropbox.com/s/c1dlhjblg5e1n36/teamspeak3-server_linux_amd64.tar.gz
ENV TS3_UID 1000
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
RUN apt-get update -q \
  && DEBIAN_FRONTEND=noninteractive apt-get install -qy bzip2 wget \
  && apt-get clean \
  && rm -rf /var/lib/apt \
  && useradd -u ${TS3_UID} ts3 \
  && mkdir -p /home/ts3 \
  && wget -q -O /home/ts3/teamspeak3-server_linux_amd64.tar.gz ${TEAMSPEAK_URL} \
  && tar xfz /home/ts3/teamspeak3-server_linux_amd64.tar.gz -C /home/ts3 \
  && rm /home/ts3/teamspeak3-server_linux_amd64.tar.gz \
  && mkdir -p /home/ts3/data/logs \
  && mkdir -p /home/ts3/data/files \
  && ln -s /home/ts3/data/files /home/ts3/teamspeak3-server_linux_amd64 \
  && ln -s /home/ts3/data/ts3server.sqlitedb /home/ts3/teamspeak3-server_linux_amd64/ts3server.sqlitedb \
  && chown -R ts3 /home/ts3
ENV PATH "${PATH}:/home/ts3/teamspeak3-server_linux_amd64"
# 9987 default voice
# 10011 server query
# 30033 file transport
EXPOSE 9987/udp 10011 30033
# ENTRYPOINT [ "/home/ts3/teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh","/home/ts3/teamspeak3-server_linux_amd64/AccountingServerEmulator-Linux" ]
COPY entrypoint.sh /home/ts3/teamspeak3-server_linux_amd64
RUN chmod +x /home/ts3/teamspeak3-server_linux_amd64/entrypoint.sh
ENTRYPOINT [ "entrypoint.sh","AccountingServerEmulator-Linux" ]
CMD [ "ts3server" ]

and as you can see uses an entrypoint
here it is:
Code:
#!/bin/bash

cat <<EOT >> /etc/hosts
127.0.0.1 teamspeak.com
127.0.0.1 accounting.teamspeak.com
127.0.0.1 backupaccounting.teamspeak.com
127.0.0.1 blacklist.teamspeak.com
127.0.0.1 ipcheck.teamspeak.com
127.0.0.1 ocsp.digicert.com
127.0.0.1 hardy.teamspeak.4players.de
::1 teamspeak.com
::1 accounting.teamspeak.com
::1 backupaccounting.teamspeak.com
::1 blacklist.teamspeak.com
::1 ipcheck.teamspeak.com
::1 ocsp.digicert.com
::1 hardy.teamspeak.4players.de
EOT

# have the default inifile as the last parameter
if [ "$1" = 'ts3server' ]; then
    set -- "$@" inifile=/home/ts3/teamspeak3-server_linux_amd64/ts3server.ini
fi

# usage: file_env VAR [DEFAULT]
#    ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
#  "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
file_env() {
    local var="$1"
    local fileVar="${var}_FILE"
    eval local varValue="\$${var}"
    eval local fileVarValue="\$${var}_FILE"
    local def="${2:-}"
    if [ "${varValue:-}" ] && [ "${fileVarValue:-}" ]; then
            echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
            exit 1
    fi
    local val="$def"
    if [ "${varValue:-}" ]; then
            val="${varValue}"
    elif [ "${fileVarValue:-}" ]; then
            val="$(cat "${fileVarValue}")"
    fi
    export "$var"="$val"
    unset "$fileVar"
    unset "$fileVarValue"
}

if [ "$1" = 'ts3server' ]; then
    file_env 'TS3SERVER_DB_HOST'
    file_env 'TS3SERVER_DB_USER'
    file_env 'TS3SERVER_DB_PASSWORD'
    file_env 'TS3SERVER_DB_NAME'
    
    cat <<- EOF >/home/ts3/teamspeak3-server_linux_amd64/ts3server.ini
        licensepath=${TS3SERVER_LICENSEPATH}
        query_protocols=${TS3SERVER_QUERY_PROTOCOLS:-raw}
        query_timeout=${TS3SERVER_QUERY_TIMEOUT:-300}
        query_ssh_rsa_host_key=${TS3SERVER_QUERY_SSH_RSA_HOST_KEY:-ssh_host_rsa_key}
        query_ip_whitelist=${TS3SERVER_IP_WHITELIST:-query_ip_whitelist.txt}
        query_ip_blacklist=${TS3SERVER_IP_BLACKLIST:-query_ip_blacklist.txt}
        dbplugin=${TS3SERVER_DB_PLUGIN:-ts3db_sqlite3}
        dbpluginparameter=${TS3SERVER_DB_PLUGINPARAMETER:-/home/ts3/teamspeak3-server_linux_amd64/ts3db.ini}
        dbsqlpath=${TS3SERVER_DB_SQLPATH:-/opt/ts3server/sql/}
        dbsqlcreatepath=${TS3SERVER_DB_SQLCREATEPATH:-create_sqlite}
        dbconnections=${TS3SERVER_DB_CONNECTIONS:-10}
        dbclientkeepdays=${TS3SERVER_DB_CLIENTKEEPDAYS:-30}
        logpath=${TS3SERVER_LOG_PATH:-/var/ts3server/logs}
        logquerycommands=${TS3SERVER_LOG_QUERY_COMMANDS:-0}
        logappend=${TS3SERVER_LOG_APPEND:-0}
        serverquerydocs_path=${TS3SERVER_serverquerydocs_path:-/opt/ts3server/serverquerydocs/}
    EOF
    cat <<- EOF >/home/ts3/teamspeak3-server_linux_amd64/ts3db.ini
        [config]
        host='${TS3SERVER_DB_HOST}'
        port='${TS3SERVER_DB_PORT:-3306}'
        username='${TS3SERVER_DB_USER}'
        password='${TS3SERVER_DB_PASSWORD}'
        database='${TS3SERVER_DB_NAME}'
        socket=
        wait_until_ready='${TS3SERVER_DB_WAITUNTILREADY:-30}'
    EOF
fi

export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH"

D1=$(readlink -f "$0")
D2=$(dirname "${D1}")
cd "${D2}"

# Start the first process
./AccountingServerEmulator-Linux -D
status=$?
if [ $status -ne 0 ]; then
  echo "Failed to start AccountingServerEmulator-Linux: $status"
  exit $status
fi

# Start the second process
./ts3server $@ -D
status=$?
if [ $status -ne 0 ]; then
  echo "Failed to start ts3server: $status"
  exit $status
fi

# Naive check runs checks once a minute to see if either of the processes exited.
# This illustrates part of the heavy lifting you need to do if you want to run
# more than one service in a container. The container exits with an error
# if it detects that either of the processes has exited.
# Otherwise it loops forever, waking up every 60 seconds

while sleep 60; do
  ps aux |grep AccountingServerEmulator-Linux |grep -q -v grep
  PROCESS_1_STATUS=$?
  ps aux |grep ts3server |grep -q -v grep
  PROCESS_2_STATUS=$?
  # If the greps above find anything, they exit with 0 status
  # If they are not both 0, then something is wrong
  if [ $PROCESS_1_STATUS -ne 0 -o $PROCESS_2_STATUS -ne 0 ]; then
    echo "One of the processes has already exited."
    exit 1
  fi
done


Sans_titre.png
 
Last edited:

S8N

New Member
Mar 18, 2017
4
2
15
I confirm, since today's teampseak client update.
I can't do anything, I think
we have to wait for the crack of a higher version.
 
Top