Skip to content

ellitedev/srb2kart-server-docker

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Sonic Robo Blast 2 Kart Server

Docker Image Version Docker Image Size

Containerized version of SRB2Kart. This is a fork of rwanyoikes Dockerfile

SRB2Kart

Containerized version of SRB2Kart, a kart racing mod based on the 3D Sonic the Hedgehog fangame Sonic Robo Blast 2, based on a modified version of Doom Legacy. You can use SRB2Kart to run a SRB2Kart dedicated netgame server given the proper config.

Usage

This will pull an image with SRB2Kart and start a dedicated netgame server on port 5029/udp:

docker run -it --name srb2kart -p 5029:5029/udp jetcodesstuff/srb2-kartserv:latest

Data Volume

The ~/.srb2kart directory is symlinked to /kart in the container. You can bind-mount a SRB2Kart directory (with configuration files, mods, etc.) on the host machine to the /kart directory inside the container. For example:

Addons

In order to load addons, bind the /addons volume to a host directory and copy them there.

docker run -it --name srb2kart -p 5029:5029/udp -v /path/on/host/addons:/addons ellite/srb2kart-server:latest
$ tree srb2kart-myserver/
srb2kart-myserver
β”œβ”€β”€ mods
β”‚Β Β  β”œβ”€β”€ kl_xxx.pk3
β”‚Β Β  β”œβ”€β”€ kl_xxx.wad
β”‚Β Β  └── kr_xxx.pk3
└── kartserv.cfg

1 directory, 4 files

This directory must be accessible to the user account that is used to run SRB2Kart inside the container. If your host machine is run under *nix OS, SRB2Kart uses the non-root account 1000:1000 (group:id, respectively).

docker run --rm -it --name srb2kart \
    -v <path to data directory>:/kart \
    -p <port on host>:5029/udp \
    jetcodesstuff/srb2-kartserv:<version> -dedicated -file \
    mods/kl_xxx.pk3 \
    mods/kl_xxx.wad \
    mods/kr_xxx.pk3

systemd

Here's an example of how to run the container as a service on Linux with the help of systemd.

  1. Create a systemd service descriptor file:
# /etc/systemd/system/docker.srb2kart.service

[Unit]
Description=SRB2Kart Server
Requires=docker.service
After=docker.service
# Ref: https://www.freedesktop.org/software/systemd/man/systemd.unit.html#StartLimitIntervalSec=interval
StartLimitIntervalSec=60s
StartLimitBurst=2

[Service]
TimeoutStartSec=0
Restart=on-failure
RestartSec=5s
ExecStartPre=/usr/bin/docker stop %n
ExecStartPre=/usr/bin/docker rm %n
ExecStartPre=/usr/bin/docker pull jetcodesstuff/srb2-kartserv:<version>
ExecStart=/usr/bin/docker run --rm --name %n \
    -v <path to data directory>:/kart \
    -p <port on host>:5029/udp \
    jetcodesstuff/srb2-kartserv:<version>

[Install]
WantedBy=multi-user.target
  1. Enable starting the service on system boot:
systemctl enable docker.srb2kart

Manual Build

git clone https://github.com/ellite/srb2kart-server-docker
cd srb2kart-server-docker/
# Ref for version numbers: https://github.com/STJr/Kart-Public/releases
docker build --build-arg "SRB2KART_VERSION=<version>" \
    -t srb2kart-server:<version> .

The build will download the Source Code and build the SRB2Kart executable, as well as download the data files (/usr/share/games/SRB2Kart) for SRB2Kart.

License

This project is licensed under the GPLv2 License.

About

🏁 Containerized version of SRB2Kart, a kart racing mod based on Sonic Robo Blast 2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 52.2%
  • Shell 47.8%