forked from mbentley/docker-teamspeak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (30 loc) · 1.3 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM debian:jessie
MAINTAINER Michael Geiger <[email protected]>
ENV TS_DIRECTORY=/opt/teamspeak
RUN apt-get update && apt-get install -y bzip2 locales w3m wget iptables && rm -rf /var/lib/apt/lists/* &&\
TS_SERVER_VER="$(w3m -dump https://www.teamspeak.com/downloads | grep -m 1 'Server 64-bit ' | awk '{print $NF}')" &&\
wget http://dl.4players.de/ts/releases/${TS_SERVER_VER}/teamspeak3-server_linux_amd64-${TS_SERVER_VER}.tar.bz2 -O /tmp/teamspeak.tar.bz2 &&\
tar jxf /tmp/teamspeak.tar.bz2 -C /opt &&\
mv /opt/teamspeak3-server_* ${TS_DIRECTORY} &&\
rm /tmp/teamspeak.tar.bz2 &&\
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen &&\
locale-gen &&\
apt-get purge -y bzip2 w3m wget &&\
apt-get autoremove -y &&\
rm -rf /var/lib/apt/lists/*
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN groupadd -g 503 teamspeak &&\
useradd -u 503 -g 503 -d ${TS_DIRECTORY} teamspeak &&\
mkdir /data &&\
chown -R teamspeak:teamspeak ${TS_DIRECTORY} /data
# add tini (https://github.com/krallin/tini)
ENV TINI_VERSION v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini
RUN chmod +x /sbin/tini
COPY entrypoint.sh /entrypoint.sh
COPY firewall.sh /
USER teamspeak
EXPOSE 9987/udp 10011 30033 41144
ENTRYPOINT ["/entrypoint.sh"]