forked from mbentley/docker-teamspeak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (27 loc) · 1.24 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
FROM alpine:latest
LABEL org.opencontainers.image.source="https://github.com/chadhutchins182/docker-teamspeak"
LABEL version="2.0" maintainer="Chad Hutchins <[email protected]>"
ENV TS_DIRECTORY=/opt/teamspeak
# for cache busting
ARG TS_SERVER_VER
# install the latest teamspeak
RUN apk add --no-cache bzip2 ca-certificates coreutils libstdc++ tini w3m shadow &&\
TS_SERVER_VER="$(w3m -dump https://www.teamspeak.com/downloads | grep -m 1 'Server 64-bit ' | awk '{print $NF}')" &&\
wget https://files.teamspeak-services.com/releases/server/${TS_SERVER_VER}/teamspeak3-server_linux_alpine-${TS_SERVER_VER}.tar.bz2 -O /tmp/teamspeak.tar.bz2 &&\
mkdir -p /opt &&\
tar jxf /tmp/teamspeak.tar.bz2 -C /opt &&\
mv /opt/teamspeak3-server_* ${TS_DIRECTORY} &&\
rm /tmp/teamspeak.tar.bz2 &&\
apk del bzip2 w3m
# create user, group, and set permissions
RUN echo "**** create teamspeak user and make our folders ****" && \
adduser -h ${TS_DIRECTORY} -s /bin/false -D teamspeak && \
PUID=${PUID:-911} && \
PGID=${PGID:-911} && \
groupmod -o -g "$PGID" teamspeak && \
usermod -o -u "$PUID" teamspeak && \
[[ -d /data ]] || mkdir /data
COPY entrypoint.sh /entrypoint.sh
# USER teamspeak
EXPOSE 9987/udp 10011 30033 41144
ENTRYPOINT ["/entrypoint.sh"]