2019-02-13 09:41:52 +00:00
# Docker TribesNext
## Information
2019-12-22 20:22:08 +00:00
Tribes 2 dedicated server patched to run in Lan mode and running within Docker under wine.
2019-02-13 09:41:52 +00:00
2019-12-22 20:25:12 +00:00
*This is does not include TribesNext and uses a LAN patch to run without it*
2019-02-13 09:41:52 +00:00
The image will pull required files and install them at build time (providing the sources are live).
2019-12-22 20:22:08 +00:00
Docker image is completely self contained when built; it is currently based off Alpine/Ubuntu. This brings in the server at around 3.2GB once built.
2019-02-13 09:41:52 +00:00
The server runs as the gameserv user
## Ports
2019-02-16 02:01:39 +00:00
Exposed ports are `666` , `28000` , the standard TribesNext ports, these can be mapped to whatever you need when you run the container, example below.
2019-02-13 09:41:52 +00:00
## Volumes
No volumes are used
## Usage
**Build the image**
2019-12-22 20:22:08 +00:00
`sudo docker-compose up --build`
2019-02-13 09:41:52 +00:00
**Run a container**
2019-02-16 02:01:39 +00:00
NB: the `--rm` arg will destroy the container when stopped; internal ports (666) can be mapped to available host ports (27999) per container
2019-12-22 20:22:08 +00:00
The container starts automatically when built.
2019-02-13 09:41:52 +00:00
**Stop container**
2019-12-22 20:25:12 +00:00
```docker ps
docker stop < container-id > ```
2019-02-13 09:41:52 +00:00
## Server Customization
2019-02-16 02:01:39 +00:00
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.
2019-12-22 20:22:08 +00:00
You can customize your server from the available options in the docker compose. These are set at build time.
2019-02-13 09:41:52 +00:00
You can override the following defaults at build time
```
ARG SRVUSER=gameserv
ARG SRVUID=1000
ARG SRVDIR=/tmp/tribes2/
```
2019-02-16 02:01:39 +00:00
You can also override the start-server script by added one to _custom this will overwrite the default at build time.
2019-02-13 09:41:52 +00:00
## Notes
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.
2019-12-22 20:22:08 +00:00
## SSH into server
```
docker ps
docker exec -it --user root < container-id > bash
```
## Install Docker
```
curl -fsSL get.docker.com -o get-docker.sh & & sudo sh get-docker.sh
sudo usermod -aG docker USERNAME
```
## Install Docker-Compose
```
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version
```