Upgrade ts3client to v3.1.8 and optimize image.

feature/docker
Icedream 2018-04-02 03:18:44 +02:00
parent fed152b3f6
commit 68198fcd24
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
2 changed files with 17 additions and 15 deletions

View File

@ -1,3 +1,17 @@
FROM alpine:3.7 AS ts3client-download
ARG TS3CLIENT_VERSION=3.1.8
# Install TeamSpeak3.
# Original comment that used to be here: temporary non-interactive teamspeak3 install hack, remove before publishing!!
# In fact, it would be nice if we had some lazy handling code for this that just requires the user to provide a "--agree-with-license" once.
ADD "http://teamspeak.gameserver.gamed.de/ts3/releases/${TS3CLIENT_VERSION}/TeamSpeak3-Client-linux_amd64-${TS3CLIENT_VERSION}.run" /ts3client.run
RUN sed -i 's/^MS_PrintLicense$/#MS_PrintLicense/g' /ts3client.run
RUN chmod +x /ts3client.run
RUN /ts3client.run --quiet --target ts3client
###
FROM node:7.10.0 FROM node:7.10.0
# Install runtime packages # Install runtime packages
@ -16,14 +30,14 @@ RUN mkdir -p /tmp/empty &&\
useradd -d /home/app -l -N -g app -m -k /tmp/empty -u 9999 app &&\ useradd -d /home/app -l -N -g app -m -k /tmp/empty -u 9999 app &&\
rmdir /tmp/empty rmdir /tmp/empty
ARG TS3CLIENT_VERSION=3.0.19.4
COPY . /home/app/ts3bot/ COPY . /home/app/ts3bot/
RUN cd ~app/ts3bot &&\ RUN cd ~app/ts3bot &&\
sed -i 's,\r,,g' setup.sh &&\ sed -i 's,\r,,g' setup.sh &&\
sh setup.sh sh setup.sh
# Startup configuration
WORKDIR /home/app WORKDIR /home/app
COPY --from=ts3client-download /ts3client/ ./ts3client
# Startup configuration
USER app USER app
CMD [ "ts3bot", "--ts3-install-path=/home/app/ts3client" ] CMD [ "ts3bot", "--ts3-install-path=/home/app/ts3client" ]

View File

@ -22,18 +22,6 @@ apt-mark auto \
mkdir -p /config mkdir -p /config
ln -sf /config ~app/.ts3bot ln -sf /config ~app/.ts3bot
# Install TeamSpeak3.
# Original comment that used to be here: temporary non-interactive teamspeak3 install hack, remove before publishing!!
# In fact, it would be nice if we had some lazy handling code for this that just requires the user to provide a "--agree-with-license" once.
(
cd ~app
wget "http://teamspeak.gameserver.gamed.de/ts3/releases/${TS3CLIENT_VERSION}/TeamSpeak3-Client-linux_amd64-${TS3CLIENT_VERSION}.run" -Ots3client.run
chmod +x ./ts3client.run
sed -i 's/^MS_PrintLicense$/#MS_PrintLicense/g' ./ts3client.run
./ts3client.run --quiet --target ts3client
rm ./ts3client.run
)
# Install TS3Bot # Install TS3Bot
( (
cd ~app/ts3bot cd ~app/ts3bot