mirror of
https://github.com/ChocoTaco1/docker-tribesnext-server.git
synced 2026-07-15 08:04:34 +00:00
Can now override the entire directory tree if necessary, can override start-server for custom start up
This commit is contained in:
parent
28c3fb527a
commit
b1b04e4af4
24 changed files with 20 additions and 17 deletions
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
build_image
|
||||||
|
run_container
|
||||||
|
*.cs
|
||||||
|
*.dso
|
||||||
|
_custom/start-server.sh
|
||||||
14
Dockerfile
14
Dockerfile
|
|
@ -5,6 +5,7 @@ MAINTAINER sairuk
|
||||||
ARG SRVUSER=gameserv
|
ARG SRVUSER=gameserv
|
||||||
ARG SRVUID=1000
|
ARG SRVUID=1000
|
||||||
ARG SRVDIR=/tmp/tribes2/
|
ARG SRVDIR=/tmp/tribes2/
|
||||||
|
ENV INSTDIR=/home/${SRVUSER}/.wine/drive_c/Dynamix/Tribes2/
|
||||||
|
|
||||||
# UPDATE IMAGE
|
# UPDATE IMAGE
|
||||||
RUN apt-get -y update && apt-get -y upgrade
|
RUN apt-get -y update && apt-get -y upgrade
|
||||||
|
|
@ -46,14 +47,13 @@ RUN chmod +x ${SRVDIR}/tribesnext-server-installer
|
||||||
RUN ${SRVDIR}/tribesnext-server-installer
|
RUN ${SRVDIR}/tribesnext-server-installer
|
||||||
|
|
||||||
|
|
||||||
# SCRIPT - server
|
# SCRIPT - server (default)
|
||||||
COPY _scripts/start-server /home/${SRVUSER}/start-server
|
COPY _scripts/start-server ${INSTDIR}/start-server
|
||||||
RUN chmod +x /home/${SRVUSER}/start-server
|
RUN chmod +x ${INSTDIR}/start-server
|
||||||
|
|
||||||
|
|
||||||
# SCRIPT - custom
|
# SCRIPT - custom (custom content / overrides)
|
||||||
COPY _custom/Classic/. /home/${SRVUSER}/.wine/drive_c/Dynamix/Tribes2/GameData/Classic/
|
COPY _custom/. ${INSTDIR}
|
||||||
COPY _custom/base/. /home/${SRVUSER}/.wine/drive_c/Dynamix/Tribes2/GameData/base/
|
|
||||||
|
|
||||||
|
|
||||||
# PERMISSIONS
|
# PERMISSIONS
|
||||||
|
|
@ -67,7 +67,7 @@ EXPOSE \
|
||||||
28000/udp
|
28000/udp
|
||||||
|
|
||||||
USER ${SRVUSER}
|
USER ${SRVUSER}
|
||||||
WORKDIR /home/${SRVUSER}
|
WORKDIR ${INSTDIR}
|
||||||
|
|
||||||
CMD ["./start-server"]
|
CMD ["./start-server"]
|
||||||
|
|
||||||
|
|
|
||||||
16
README.md
16
README.md
|
|
@ -13,7 +13,7 @@ The server runs as the gameserv user
|
||||||
|
|
||||||
|
|
||||||
## Ports
|
## Ports
|
||||||
Exposed ports are `666`, `28000`, the standard TribesNext ports, these can be mapped to whatever you need when you run the container, see the run_container script for an example of how to execute this.
|
Exposed ports are `666`, `28000`, the standard TribesNext ports, these can be mapped to whatever you need when you run the container, example below.
|
||||||
|
|
||||||
|
|
||||||
## Volumes
|
## Volumes
|
||||||
|
|
@ -27,7 +27,7 @@ No volumes are used
|
||||||
|
|
||||||
**Run a container**
|
**Run a container**
|
||||||
|
|
||||||
NB: the `--rm` arg will destroy the container when stopped.
|
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 \
|
docker run -d --rm \
|
||||||
-p 27999:666/tcp \
|
-p 27999:666/tcp \
|
||||||
|
|
@ -42,13 +42,8 @@ tribesnext-server:latest
|
||||||
|
|
||||||
|
|
||||||
## Server Customization
|
## Server Customization
|
||||||
You can customize the server at build time by dropping the appropriate files at the appropriate locations in `_custom/`, these will be copied into the image in the appropriate places overwriting the default files if present.
|
You can customize the server at build time by dropping the appropriate files at the appropriate locations in `_custom/`, these will be copied into the image into the install location within the container at build time.
|
||||||
|
|
||||||
Currently supports
|
|
||||||
* base
|
|
||||||
* Classic
|
|
||||||
|
|
||||||
If you want to add a new mod this will require a new `COPY` instruction added to the `Dockerfile` and an image rebuild, or raise an issue/pull request and we can look at updating the main repo.
|
|
||||||
|
|
||||||
You can override the following defaults at build time
|
You can override the following defaults at build time
|
||||||
```
|
```
|
||||||
|
|
@ -57,13 +52,16 @@ ARG SRVUID=1000
|
||||||
ARG SRVDIR=/tmp/tribes2/
|
ARG SRVDIR=/tmp/tribes2/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also override the start-server script by added one to _custom this will overwrite the default at build time.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
You can modify the installer script to update the source locations of the required files.
|
You can modify the installer script to update the source locations of the required files.
|
||||||
|
|
||||||
`tribesnext-server-installer` may also be used in standalone mode to install TribesNext RC2a on the host system under wine but your mileage may vary.
|
`tribesnext-server-installer` may also be used in standalone mode to install TribesNext RC2a on the host system under wine but your mileage may vary.
|
||||||
|
|
||||||
Testing has been minimal
|
Testing has been minimal but it is running the NET247 server so you can try it out at any point.
|
||||||
|
|
||||||
## 2do
|
## 2do
|
||||||
* Thinner base OS
|
* Thinner base OS
|
||||||
|
|
|
||||||
|
|
@ -8,5 +8,5 @@ find ${BASEDIR} -name \*.dso -execdir /bin/rm {} \;
|
||||||
cd $WINEPREFIX/drive_c/Dynamix/Tribes2/GameData
|
cd $WINEPREFIX/drive_c/Dynamix/Tribes2/GameData
|
||||||
|
|
||||||
xvfb-run -a -w 5 \
|
xvfb-run -a -w 5 \
|
||||||
wine Tribes2.exe -dedicated -mod Classic
|
wine Tribes2.exe -dedicated
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue