Kart Containerized

[Utility] Kart Containerized

Ellite

she/her
Ellite submitted a new resource:

Kart Containerized - Containerized Kart Dedicated Server

Kart Containerized
This is an up to date Docker image based on rwanyoikes Dockerfile.
I plan to keep this image actually up to date with the most recent version of Kart.
The image currently has tags for 1.3, 1.4, 1.5 and 1.6.

This will pull an image with SRB2Kart and start a dedicated netgame server on port 5029/udp:
Bash:
docker run -it --name srb2kart -p 5029:5029/udp ellite/srb2kart-server:latest
Addons
In order to load addons, bind the /addons volume to a host directory and copy them there.
Bash:
docker run -it --name srb2kart -p 5029:5029/udp -v /path/on/host/addons:/addons ellite/srb2kart-server:latest
Luafiles
Do your addons save configs/data in the /luafiles folder? Bind the /luafiles volume to a host directory.
Bash:
docker run -it --name srb2kart -p 5029:5029/udp -v /path/on/host/luafiles:/luafiles ellite/srb2kart-server:latest
Config
In order to configure server variables, bind the /config volume to a host directory, create kartserv.cfg, and edit it.
Bash:
docker run -it --name srb2kart -p 5029:5029/udp -v /path/on/host/config:/config ellite/srb2kart-server:latest
Bash:
sudo nano /path/on/host/config/kartserv.cfg
Persistent Data
In order to persist data through server shutdowns, bind the /data volume to a host directory.
Bash:
docker run -it --name srb2kart -p 5029:5029/udp -v /path/on/host/data:/data ellite/srb2kart-server:latest
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:
    Bash:
    # /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 ellite/srb2kart-server:<version>
    ExecStart=/usr/bin/docker run --rm --name %n \
        -v <path to data directory>:/data \
        -v <path to config directory>:/config \
        -v <path to addons directory>:/addons \
        -v <path to luafiles directory>:/luafiles \
        -p <port on host>:5029/udp \
        ellite/srb2kart-server:<version>
    
    [Install]
    WantedBy=multi-user.target
  2. Enable starting the service on system boot:
    Bash:
    systemctl enable docker.srb2kart
Bash:
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 from a mirror (https://srb2kmods.ellite.dev/) and build the SRB2Kart executable, as well as download the data files (/usr/share/games/SRB2Kart) for SRB2Kart.

More information on how to use this on the GitHub repo.

Read more about this resource...
 
Last edited:
I hope eventually this resource will land in the staffs queue :dramahog:
I probably messed something up in this thread, if so, please let me know
 
Last edited:
Sorry for not getting to this any sooner, the only actual reason why this hasn't been approved is due to the ko-fi link.

As SRB2 is a fan-made game based on Sega's wholly owned IP, having anything on-site that suggests supporting somebody monetarily for their property is a pretty good way of getting Sega taking action against us and other fan-works. Now, we don't necessarily care about what you do with the link on your own platform off-site, but on-site it can read badly.

We can edit the link out of the submission before approving it if that is fine, it would save you having to remake the whole post after all.
 
I've also taken the liberty of making a fork of rwanyoikes Dockerfile, as well as used your build as a reference. My build is still based off Alpine 3.12, uses the official AssetsLinuxOnly.zip, and now also includes a NGINX auto repo.

The startup script is a little messy at the moment but everything works. Also used buildkit to make it arm64 and armv7 compatible.

With your permission I'd like to either merge my work into your branch or take over as maintainer of this project if you'd preferr @Ellite


 
Hey sorry! I never got an email about this message. I'll get back to you on this later today!!
Post automatically merged:

Hey! If you'd like to merge, you could open a pull request (or multiple). Perhaps open an issue per thing that you've improved over my repo, and i'll look through them and accept them. Let me know what you think!

I'll then also remove the Sponsor links on the github repo, and add you as a collaborator.
 
Last edited:
I get SIGSEGV issues with this container on a daily basis.

We'll be playing, new level loads, SIGSEGV and everyone is kicked. It's not every level change, but it'll definitely happen reliably within an hour of gameplay.

Same addons in a windows-based server, no issues.

I noticed you're using alpine linux as the container's base. I'm pretty sure this is the issue.
We've tried to use alpine for our docker containers at work (NodeJS based applications). We can reliably trigger a SIGSEGV using crypto libraries (auth checking). Ubuntu containers have zero issues.
 
I haven't been that active on the forums and just saw this message

I can confirm that there seems to be some recurring SIGSEV's. We were experiencing them on spinOut when more complicated maps came in (Lookin at you bellbridge 😐)

Really I only stuck with the alpine build for its tiny size, it's lightweight enough to run on oracle's free tier. Repacking it to fit into an ubuntu container should be easy peasy. I'll give it a crack sometime soon
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top