Public | Automated Build

Last pushed: 23 days ago
Short Description
Dockerfile for running a Killing Floor 2 server under wine
Full Description

docker-kf2

Dockerfile for running a Killing Floor 2 server

Requirements

2GB RAM and 30GB free disk space are essential. SSD recommended, otherwise map
changes will take a long time. Disk space requirements will keep going up as
updates are released.

Simple start

mkdir -p $HOME/{kf2,kf2_steamdir}
docker run -d -t --name kf2 -p 0.0.0.0:20560:20560/udp \
    -p 0.0.0.0:27015:27015/udp \
    -p 0.0.0.0:7777:7777/udp \
    -p 0.0.0.0:8080:8080 \
    -v $HOME/kf2:/home/steam/kf2server \
    -v $HOME/kf2_steamdir:/home/steam/steam \
    dwurf/docker-kf2:latest

Configuring the server

Configuration is done via environment variables. To run a long, hard server:

docker run -d -t --name kf2 -p 0.0.0.0:20560:20560/udp \
    -p 0.0.0.0:27015:27015/udp \
    -p 0.0.0.0:7777:7777/udp \
    -p 0.0.0.0:8080:8080 \
    -v $HOME/kf2:/home/steam/kf2server \
    -v $HOME/kf2_steamdir:/home/steam/steam \
    -e KF_DIFFICULTY=1 \
    -e KF_GAME_LENGTH=2 \
    dwurf/docker-kf2:latest

Updating the server

Run with the command update

docker run -d -t --name kf2 -p 0.0.0.0:20560:20560/udp \
    -p 0.0.0.0:27015:27015/udp \
    -p 0.0.0.0:7777:7777/udp \
    -p 0.0.0.0:8080:8080 \
    -v $HOME/kf2:/home/steam/kf2server \
    -v $HOME/kf2_steamdir:/home/steam/steam \
    dwurf/docker-kf2:latest \
    update

Further arguments get passed to the update command, e.g.

docker run -d -t --name kf2 -p 0.0.0.0:20560:20560/udp \
    -p 0.0.0.0:27015:27015/udp \
    -p 0.0.0.0:7777:7777/udp \
    -p 0.0.0.0:8080:8080 \
    -v $HOME/kf2:/home/steam/kf2server \
    -v $HOME/kf2_steamdir:/home/steam/steam \
    dwurf/docker-kf2:latest \
    update -beta preview validate

Variables

KF_MAP (default: KF-BioticsLab)

Starting map when the server is first loaded

KF_DIFFICULTY (default: 0)

Game difficulty.

  • 0 - normal
  • 1 - hard
  • 2 - suicidal
  • 3 - hell on earth

KF_ADMIN_PASS (default: secret)

Used for web console and in-game admin logins

KF_GAME_PASS (default: '')

Setting this creates a private server

KF_GAME_LENGTH (default: 1)

  • 0 - 4 waves
  • 1 - 7 waves
  • 2 - 10 waves

KF_GAME_MODE (default: Survival)

Options are:

  • Survival
  • VersusSurvival
  • WeeklySurvival

KF_SERVER_NAME (default: Killing Floor 2 Server)

Name that appears in the server browser

KF_ENABLE_WEB (default: false)

Set to true to enable the web console. You should probably also change the
default admin password
Access the web console on port 8080, the username is admin, the password is
set to KF_ADMIN_PASS (default: secret)

KF_DISABLE_TAKEOVER (default: false)

Set to true to prevent randoms from taking over the server. Useful if you've
set a password on your server.

Building the image

docker build -t dwurf/docker-kf2:latest .

TODO

Docker Pull Command
Owner
dwurf
Source Repository