This repository has been archived by the owner on Jun 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
72 lines (67 loc) · 2.58 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM saoneth/apline-glibc
ENV LANG=C.UTF-8
ARG GOSU_VERSION 1.11
RUN set -ex; \
\
fetchDeps=' \
dpkg \
ca-certificates \
wget \
gnupg \
'; \
apk add --no-cache --virtual .gosu-deps $fetchDeps; \
\
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
\
# verify the signature
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver p80.pool.sks-keyservers.net --recv-keys "B42F6819007F00F88E364FD4036A9C25BF357DD4"; \
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
\
chmod +x /usr/local/bin/gosu; \
# verify that the binary works
gosu nobody true; \
\
apk del .gosu-deps
ARG TEAMSPEAK_URL http://dl.4players.de/ts/releases/3.5.0/teamspeak3-server_linux_amd64-3.5.0.tar.bz2
RUN { \
apk add --no-cache ca-certificates; \
addgroup -g 1000 teamspeak; \
adduser -u 1000 -G teamspeak -h /home/teamspeak -S -D teamspeak -s /bin/sh; \
\
apk add --no-cache --virtual .get-deps curl; \
\
curl -o /tmp/teamspeak3-server_linux_amd64.tar.bz2 "${TEAMSPEAK_URL}"; \
\
apk del .get-deps; \
\
tar jxvf /tmp/teamspeak3-server_linux_amd64.tar.bz2 -C /tmp; \
rm -rf \
/tmp/teamspeak3-server_linux_amd64.tar.bz2 \
/tmp/teamspeak3-server_*/redist \
/tmp/teamspeak3-server_*/doc \
/tmp/teamspeak3-server_*/serverquerydocs \
/tmp/teamspeak3-server_*/tsdns \
/tmp/teamspeak3-server_*/CHANGELOG \
/tmp/teamspeak3-server_*/LICENSE \
/tmp/teamspeak3-server_*/ts3server_startscript.sh \
/home/teamspeak \
; \
mv /tmp/teamspeak3-server_* /home/teamspeak; \
mkdir \
/data \
/data/logs \
/data/files \
; \
ln -s /data/logs /home/teamspeak/logs; \
ln -s /data/files /home/teamspeak/files; \
ln -s /data/ts3server.sqlitedb /home/teamspeak/ts3server.sqlitedb; \
chown -R teamspeak:teamspeak /home/teamspeak /data; \
}
VOLUME ["/data"]
EXPOSE 9987/udp 10011 30033
ENTRYPOINT ["/usr/local/bin/gosu", "teamspeak:teamspeak", "/home/teamspeak/ts3server_minimal_runscript.sh"]
CMD ["license_accepted=1", "inifile=/data/ts3server.ini", "logpath=/data/logs", "licensepath=/data/", "query_ip_whitelist=/data/query_ip_whitelist.txt", "query_ip_backlist=/data/query_ip_blacklist.txt"]