mirror of
https://github.com/ChocoTaco1/docker-tribesnext-server.git
synced 2026-01-19 16:14:45 +00:00
A lot of updates
Git-clone working Wine Version options
This commit is contained in:
parent
b1b04e4af4
commit
ebffe80abf
15
Dockerfile
15
Dockerfile
|
|
@ -1,5 +1,5 @@
|
|||
FROM multiarch/debian-debootstrap:i386-jessie
|
||||
MAINTAINER sairuk
|
||||
MAINTAINER sairuk battlelore chocotaco
|
||||
|
||||
# ENVIRONMENT
|
||||
ARG SRVUSER=gameserv
|
||||
|
|
@ -7,11 +7,16 @@ ARG SRVUID=1000
|
|||
ARG SRVDIR=/tmp/tribes2/
|
||||
ENV INSTDIR=/home/${SRVUSER}/.wine/drive_c/Dynamix/Tribes2/
|
||||
|
||||
# WINE VERSION: wine = 1.6, wine-development = 1.7.29 for i386-jessie
|
||||
ENV WINEVER=wine-development
|
||||
|
||||
# UPDATE IMAGE
|
||||
RUN apt-get -y update && apt-get -y upgrade
|
||||
RUN apt-get -y update
|
||||
RUN apt-get -y upgrade
|
||||
|
||||
|
||||
# DEPENDENCIES
|
||||
RUN dpkg --add-architecture i386
|
||||
RUN apt-get -y install \
|
||||
# -- access
|
||||
sudo unzip \
|
||||
|
|
@ -20,9 +25,11 @@ rsyslog \
|
|||
# -- utilities
|
||||
sed less vim file \
|
||||
# --- wine
|
||||
wine \
|
||||
${WINEVER} \
|
||||
# -- display
|
||||
xvfb
|
||||
xvfb \
|
||||
# -- git clone
|
||||
git-core
|
||||
|
||||
|
||||
# CLEAN IMAGE
|
||||
|
|
|
|||
|
|
@ -29,11 +29,7 @@ No volumes are used
|
|||
|
||||
NB: the `--rm` arg will destroy the container when stopped; internal ports (666) can be mapped to available host ports (27999) per container
|
||||
```
|
||||
docker run -d --rm \
|
||||
-p 27999:666/tcp \
|
||||
-p 28000:28000/udp \
|
||||
--name tribesnext-server \
|
||||
tribesnext-server:latest
|
||||
docker run -d --rm -p 27999:666/tcp -p 28000:28000/udp --name tribesnext-server tribesnext-server:latest
|
||||
```
|
||||
|
||||
**Stop container**
|
||||
|
|
|
|||
|
|
@ -8,5 +8,4 @@ find ${BASEDIR} -name \*.dso -execdir /bin/rm {} \;
|
|||
cd $WINEPREFIX/drive_c/Dynamix/Tribes2/GameData
|
||||
|
||||
xvfb-run -a -w 5 \
|
||||
wine Tribes2.exe -dedicated
|
||||
|
||||
$WINEVER Tribes2.exe --backend=curses -dedicated -mod Classic 28000
|
||||
|
|
@ -10,7 +10,7 @@ SRVUSER=gameserv
|
|||
INSBASE=/home/$SRVUSER/.wine/drive_c/Dynamix/
|
||||
export TMPBASE=/tmp/tribes2
|
||||
export WINEPREFIX=/home/$SRVUSER/.wine/
|
||||
export REQUIREMENTS=(wine Xvfb)
|
||||
export REQUIREMENTS=($WINEVER Xvfb)
|
||||
|
||||
# -- server requirements
|
||||
function check_requirements {
|
||||
|
|
@ -31,7 +31,7 @@ function check_requirements {
|
|||
function get_files {
|
||||
if [ ! -f "$TMPBASE/$1" ]
|
||||
then
|
||||
/usr/bin/wget --no-check-certificate -q "$2/$1" -O "$TMPBASE/$1"
|
||||
/usr/bin/wget --no-check-certificate "$2/$1" -O "$TMPBASE/$1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -50,9 +50,13 @@ fi
|
|||
|
||||
|
||||
# -- download files
|
||||
get_files tribes2gsi.exe "https://www.the-construct.net/downloads/tribes2/" "$TMPBASE"
|
||||
get_files TribesNext_rc2a.exe "https://www.tribesnext.com/files/" "$TMPBASE"
|
||||
get_files TribesNext_RC2_LinuxVersion.zip "https://lutris.net/files/games/tribes-2/" "$TMPBASE"
|
||||
get_files tribes2gsi.exe "https://www.the-construct.net/downloads/tribes2/" "$TMPBASE"
|
||||
get_files TribesNext_rc2a.exe "https://www.tribesnext.com/files/" "$TMPBASE"
|
||||
get_files ruby-1.9.0-2-i386-mswin32.zip "https://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/unstable" "$TMPBASE"
|
||||
get_files classic_v152.zip "https://tribes2stats.com/files/mods/" "$TMPBASE"
|
||||
|
||||
git clone "https://github.com/ChocoTaco1/TacoServer/" "$TMPBASE/TacoServer"
|
||||
git clone "https://github.com/ChocoTaco1/TacoMaps/" "$TMPBASE/TacoMaps"
|
||||
|
||||
# -- some items require an headerless
|
||||
export DISPLAY=:99
|
||||
|
|
@ -64,7 +68,8 @@ sleep 1
|
|||
|
||||
|
||||
# -- extract the main installer, the silent installer is a lie!
|
||||
/usr/bin/wine $TMPBASE/tribes2gsi.exe /x Z:\\tmp\\tribes2\\game
|
||||
echo "Installing tribes2gsi.exe..."
|
||||
/usr/bin/$WINEVER $TMPBASE/tribes2gsi.exe /x Z:\\tmp\\tribes2\\game
|
||||
|
||||
|
||||
# -- move all extract files into place
|
||||
|
|
@ -246,10 +251,38 @@ then
|
|||
fi
|
||||
|
||||
# -- install tribesnext silently
|
||||
[ -f $TMPBASE/TribesNext_rc2a.exe ] && /usr/bin/wine $TMPBASE/TribesNext_rc2a.exe /S
|
||||
echo "Installing TribesNext_rc2a.exe..."
|
||||
[ -f $TMPBASE/TribesNext_rc2a.exe ] && /usr/bin/$WINEVER $TMPBASE/TribesNext_rc2a.exe /S
|
||||
|
||||
|
||||
# -- extract updated linux version and replace the existing installation
|
||||
[ -f $TMPBASE/TribesNext_RC2_LinuxVersion.zip ] && /usr/bin/unzip -o $TMPBASE/TribesNext_RC2_LinuxVersion.zip -d $INSBASE/Tribes2/GameData 2>&1 > /dev/null
|
||||
# -- update Ruby v1.9.0-2
|
||||
echo "Installing Ruby Interpreter v1.9.0-2..."
|
||||
[ -f $TMPBASE/ruby-1.9.0-2-i386-mswin32.zip ] && /usr/bin/unzip -o $TMPBASE/ruby-1.9.0-2-i386-mswin32.zip -d $TMPBASE/ruby 2>&1 > /dev/null
|
||||
if [ -f $TMPBASE/ruby-1.9.0-2-i386-mswin32.zip ]
|
||||
then
|
||||
cp -r $TMPBASE/ruby/bin/msvcrt-ruby190.dll $INSBASE/Tribes2/GameData/msvcrt-ruby190.dll
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
# -- update Classic mod to v1.5.2
|
||||
echo "Installing Classic mod to v1.5.2..."
|
||||
[ -f $TMPBASE/classic_v152.zip ] && /usr/bin/unzip -o $TMPBASE/classic_v152.zip -d $TMPBASE/classic 2>&1 > /dev/null
|
||||
[ -f $TMPBASE/classic/classic_files_v152.zip ] && /usr/bin/unzip -o $TMPBASE/classic/classic_files_v152.zip -d $TMPBASE/classic 2>&1 > /dev/null
|
||||
# -- move all extract files into place
|
||||
if [ -f $TMPBASE/classic/classic_files_v152.zip ]
|
||||
then
|
||||
# /home/gameserv/.wine/drive_c/Dynamix/Tribes2/GameData/Classic
|
||||
mv -f $TMPBASE/classic/base/zz_classic_client_v1.vl2 $INSBASE/Tribes2/GameData/base/zz_Classic_client_v1.vl2
|
||||
cp -r $TMPBASE/classic/classic/. $INSBASE/Tribes2/GameData/Classic/.
|
||||
fi
|
||||
|
||||
# -- install TacoServer
|
||||
echo "Installing TacoServer..."
|
||||
cp -r $TMPBASE/TacoServer/Classic/. $INSBASE/Tribes2/GameData/Classic/.
|
||||
|
||||
# -- install TacoMaps
|
||||
echo "Installing TacoMaps..."
|
||||
mkdir -p $INSBASE/Tribes2/GameData/Classic/Maps
|
||||
cp -r $TMPBASE/TacoMaps/ $INSBASE/Tribes2/GameData/Classic/Maps/
|
||||
|
||||
exit 0
|
||||
5
docker-compose.override.yml
Normal file
5
docker-compose.override.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
version: "3.7"
|
||||
|
||||
networks:
|
||||
t2-net:
|
||||
driver: bridge
|
||||
40
docker-compose.yml
Normal file
40
docker-compose.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
version: "3.7"
|
||||
|
||||
services:
|
||||
|
||||
t2:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile
|
||||
environment:
|
||||
# TODO
|
||||
T2_SERVERNAME: "T2DockerTest"
|
||||
|
||||
ports:
|
||||
- target: 28000
|
||||
published: 28000
|
||||
protocol: udp
|
||||
mode: host
|
||||
- target: 666
|
||||
protocol: tcp
|
||||
published: 27999
|
||||
mode: host
|
||||
|
||||
networks:
|
||||
- t2-net
|
||||
|
||||
deploy:
|
||||
replicas: 1
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 5s
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
||||
logging:
|
||||
options:
|
||||
max-size: "10m"
|
||||
|
||||
networks:
|
||||
t2-net:
|
||||
driver: overlay
|
||||
Loading…
Reference in a new issue