1
0
mirror of https://github.com/Luzifer/rust-server.git synced 2024-09-19 00:23:01 +00:00

Update to new downloader

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-05-16 00:00:14 +02:00
parent e19649d715
commit 3982c03b7e
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E
2 changed files with 45 additions and 7 deletions

View File

@ -1,14 +1,47 @@
FROM debian
ENV LC_ALL=C \
LC_CTYPE=C \
LANG=C
RUN set -ex \
&& dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -y mailutils postfix curl wget file bzip2 gzip unzip bsdmainutils python util-linux tmux lib32gcc1 libstdc++6 libstdc++6:i386 \
&& adduser --disabled-password rustserver
&& apt-get install -y \
bc \
binutils \
bsdmainutils \
bzip2 \
ca-certificates \
curl \
file \
gzip \
lib32gcc1 \
lib32z1 \
libstdc++6 \
libstdc++6:i386 \
locales \
mailutils \
postfix \
procps \
python \
tmux \
unzip \
util-linux \
wget \
&& adduser --disabled-password rustserver \
&& echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen \
&& locale-gen \
&& update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
ADD https://gameservermanagers.com/dl/rustserver /opt/rustserver
WORKDIR /tmp
ADD https://linuxgsm.com/dl/linuxgsm.sh /tmp/linuxgsm.sh
RUN set -ex \
&& chmod 755 /opt/rustserver
&& chmod 0644 linuxgsm.sh \
&& su -c "bash linuxgsm.sh rustserver" rustserver \
&& chmod 0755 rustserver \
&& mv /tmp/rustserver /opt/rustserver
USER rustserver
WORKDIR /home/rustserver

View File

@ -1,11 +1,16 @@
#!/bin/bash
set -euxo pipefail
# Copy default rustserver script from Linux Game Server Managers when not present
[ -e /home/rustserver/rustserver ] || cp /opt/rustserver /home/rustserver/rustserver
[ -e /home/rustserver/rustserver ] || {
cp /opt/rustserver /home/rustserver/rustserver
chmod 0755 /home/rustserver/rustserver
}
/home/rustserver/rustserver "$@"
set +x
# Keep Docker container running until gameserver process is not longer available
while ( pgrep RustDedicated >/dev/null 2>&1 ); do
sleep 1
while (pgrep RustDedicated >/dev/null 2>&1); do
sleep 1
done