mirror of
https://github.com/Luzifer/rust-server.git
synced 2024-11-09 16:10:03 +00:00
Initial
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
commit
63a6c7c9cd
2 changed files with 32 additions and 0 deletions
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
@ -0,0 +1,21 @@
|
|||
FROM debian
|
||||
|
||||
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
|
||||
|
||||
ADD https://gameservermanagers.com/dl/rustserver /opt/rustserver
|
||||
RUN set -ex \
|
||||
&& chmod 755 /opt/rustserver
|
||||
|
||||
USER rustserver
|
||||
WORKDIR /home/rustserver
|
||||
|
||||
ADD start.sh /opt/start.sh
|
||||
|
||||
VOLUME /home/rustserver
|
||||
|
||||
EXPOSE 28015/udp 28016
|
||||
ENTRYPOINT ["/opt/start.sh"]
|
11
start.sh
Executable file
11
start.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copy default rustserver script from Linux Game Server Managers when not present
|
||||
[ -e /home/rustserver/rustserver ] || cp /opt/rustserver /home/rustserver/rustserver
|
||||
|
||||
/home/rustserver/rustserver "$@"
|
||||
|
||||
# Keep Docker container running until gameserver process is not longer available
|
||||
while ( pgrep RustDedicated >/dev/null 2>&1 ); do
|
||||
sleep 1
|
||||
done
|
Loading…
Reference in a new issue