dwurf / docker-kf2 Goto Github PK
View Code? Open in Web Editor NEWDockerfile for running a Killing Floor 2 server under Linux
License: MIT License
Dockerfile for running a Killing Floor 2 server under Linux
License: MIT License
Is it intended that after first run all environment variables are being ignored?
If yes, what's the correct way to update the configuration?
edit I think i was just confused by the initial CLI output
--2016-03-03 01:34:08-- http://www.redorchestra2.fr/downloads/KF2_WineDLL.zip
Resolving www.redorchestra2.fr (www.redorchestra2.fr)... 195.154.73.238
Connecting to www.redorchestra2.fr (www.redorchestra2.fr)|195.154.73.238|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 390223 (381K) [application/zip]
Saving to: 'downloads/KF2_WineDLL.zip'
wine: '/kf2' is not owned by you, refusing to create a configuration directory there
wine: '/kf2' is not owned by you, refusing to create a configuration directory there
kf2_functions.sh: line 30: cd: /kf2/.wine/drive_c/windows/system32: No such file or directory
unzip: cannot find or open //downloads/KF2_WineDLL.zip, //downloads/KF2_WineDLL.zip.zip or //downloads/KF2_WineDLL.zip.ZIP.
wine cmd.exe /c echo '%ProgramFiles%' returned empty string
wine: '/kf2' is not owned by you, refusing to create a configuration directory there
wine: '/kf2' is not owned by you, refusing to create a configuration directory there
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
sed: can't read /kf2/kf2server/KFGame/Config/PCServer-KFGame.ini: No such file or directory
sed: can't read /kf2/kf2server/KFGame/Config/PCServer-KFGame.ini: No such file or directory
sed: can't read /kf2/kf2server/KFGame/Config/KFWeb.ini: No such file or directory
wine: '/kf2' is not owned by you, refusing to create a configuration directory there
Hi guys,
I noted an issue while spinning up a server on > RHEL 7 which means there's a couple of compatibility issues with the quick start code provided. I don't think it should be anything changed in that quickstart but I suspect it may be worthwhile adding to the README.
sysctl -w net.ipv4.ip_forward=1
then restart docker systemctl restart docker
to fix.I don't think either of these issues will be apparent on any other OS bar RHEL and it's offshoots so really believe this will simply be a README level thing. I'll add anything more I find during my work here then I'll make any required changes in a fork if it's suitable.
Thanks,
Jim
Hey @dwurf !
I recently did a complete overhaul to my kf1-docker installation/image. It now supports several new env vars such as ports to enable support for Multiple servers.
I noticed, your current solution for this is using a docker-compose and increment the ports. My question is, does this actually work if you're running servers on the same machine just fine? is it OK to increment steam ports?
My use case:
I ran my first server using a docker run just fine, it works and I can see it. This is using default ports (For both, Steam and the game itself).
Now I want to spin up a new container with new volume etc... for a 2nd server. I increment 3 ports (which can be changed within Killingfloor.ini), but the other 3 which are related to steam I cannot change. docker is complaing that my 1st server is still using these ports.. I'm not sure if your solution also fixes this?
My current docker-compose:
version: '2'
services:
Server2:
container_name: Nanu-Nanu-2-NUC
image: vel7an/kf1-docker:latest
restart: always
ports:
- 0.0.0.0:7709:7709/udp # Changed in Killingfloor.ini
- 0.0.0.0:7719:7719/udp # Changed in Killingfloor.ini
- 0.0.0.0:8077:8077/tcp # Changed in Killingfloor.ini
- 0.0.0.0:7708:7708/udp # Cannot use because Server1 is using it
- 0.0.0.0:28852:28852/udp # Cannot use because Server1 is using it
- 0.0.0.0:28852:28852/tcp # Cannot use because Server1 is using it
- 0.0.0.0:20560:20560/udp # Cannot use because Server1 is using it
- 0.0.0.0:20560:20560/tcp # Cannot use because Server1 is using it
environment:
- KF_MAP=KF-BioticsLab
- KF_DIFFICULTY=4
- KF_GAME_LENGTH=2
- KF_GAME_PASS=
- KF_SERVER_NAME=Hosts of SeraphiM
- KF_ADMIN_NAME=Vel
- KF_ADMIN_PASS=XXX
- [email protected]
- KF_MOTD=XXX
- KF_REDIRECT=XXX
- KF_MUTATORS=MutLoader.MutLoader
- STEAM_USER=user
- STEAM_PASSWORD=secret
- STEAM_CODE=12345
volumes:
- /home/vel/kf-stuff/server-volume-2:/home/steam/servers/kf
Server 1 running using the following:
docker run -i --name Nanu-Nanu-NUC -p 0.0.0.0:7707:7707/udp -p 0.0.0.0:7708:7708/udp -p 0.0.0.0:7717:7717/udp -p 0.0.0.0:28852:28852/udp -p 0.0.0.0:28852:28852/tcp -p 0.0.0.0:8075:8075/tcp -p 0.0.0.0:20560:20560/udp -p 0.0.0.0:20560:20560/tcp -v /home/vel/kf-stuff/server-volume:/home/steam/servers/kf -e STEAM_USER=user -e STEAM_PASSWORD=secret -e STEAM_CODE=$1 --env-file=/home/vel/kf-stuff/env_file vel7an/kf1-docker
Do you have any ideas? Is it even possible to have 2 containers using same steam ports even with docker-compose?
How does it work exactly with your setup? Are you also incrementing 20560?
No clan motto can currently be set. Noticed following my PR earlier. Will see if that's possible at all.
I am running docker on a Debian buster x64 host. When installing a new server using the latest dwurf/docker-kf2 docker image, the steamcmd install fails with this output:
+ require_steamcmd
+ mkdir -p /home/steam/steam/downloads
+ [[ -f /home/steam/steam/downloads/steamcmd_linux.tar.gz ]]
+ wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz -P /home/steam/steam/downloads
--2021-02-17 01:49:48-- https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
Resolving steamcdn-a.akamaihd.net (steamcdn-a.akamaihd.net)... 104.120.129.54, 104.120.129.56, 104.120.129.38, ...
Connecting to steamcdn-a.akamaihd.net (steamcdn-a.akamaihd.net)|104.120.129.54|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2428561 (2.3M) [application/octet-stream]
Saving to: '/home/steam/steam/downloads/steamcmd_linux.tar.gz'
steamcmd_linux.tar.gz 100%[=============================================================================================================>] 2.32M 9.81MB/s in 0.2s
2021-02-17 01:49:49 (9.81 MB/s) - '/home/steam/steam/downloads/steamcmd_linux.tar.gz' saved [2428561/2428561]
+ [[ -f /home/steam/steam/steamcmd.sh ]]
+ cd /home/steam/steam
+ tar xzvf downloads/steamcmd_linux.tar.gz
steamcmd.sh
linux32/steamcmd
linux32/steamerrorreporter
linux32/libstdc++.so.6
linux32/crashhandler.so
+ cd /home/steam/steam
+ ./steamcmd.sh +exit
Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
threadtools.cpp (3787) : Assertion Failed: Probably deadlock or failure waiting for thread to initialize.
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
[ 0%] Checking for available update...
crash_20210217014949_3.dmp[23]: Uploading dump (out-of-process)
/tmp/dumps/crash_20210217014949_3.dmp
Thread failed to initialize
crash_20210217014949_3.dmp[23]: Finished uploading minidump (out-of-process): success = no
crash_20210217014949_3.dmp[23]: error: libcurl.so: cannot open shared object file: No such file or directory
crash_20210217014949_3.dmp[23]: file ''/tmp/dumps/crash_20210217014949_3.dmp'', upload no: ''libcurl.so: cannot open shared object file: No such file or directory''
threadtools.cpp (3787) : Assertion Failed: Probably deadlock or failure waiting for thread to initialize.
Thread failed to initialize
CWorkThreadPool::StartWorkThread: Thread creation failed.
Exiting on SPEW_ABORT
I believe this is due to the issue reported here: ValveSoftware/steam-for-linux#7190
A quick workaround is to replace FROM ubuntu:focal
in the Dockerfile with FROM ubuntu:bionic
. Happy to submit a PR if you're okay with this change.
When I run the below command, I receive many permission denied errors in the docker log. Any ideas?
Command run:
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
-e KF_DIFFICULTY=1
-e KF_GAME_LENGTH=2
-e KF_SERVER_NAME="Pugs Den"
dwurf/docker-kf2:latest
Below are the errors in the docker logs:
Cannot write to '/home/steam/steam/downloads/steamcmd_linux.tar.gz' (No such file or directory).
Hello, I am somewhat new to docker but I was able to follow all the steps provided and got a server working. But feel that a few things should be updated in the guide:
The guide says to create a game.yml file in the home directory and at "runtime" the maps listed in game.yml will be created in the two .ini files in the KF2 server.
I used docker container cp game.yml container_id:/home/game.yml
to move the game.yml into the container for the server. It might be my lack of docker knowledge but it seems like the game.yml file needs to in the image before making a container since when I try to restart the container the custom map isn't added (just testing with the example map as listed in the guide). I have checked with exec bash command for that the file gets transferred.
I can confirm editing the two ini files and added the correct format for workshop maps does work.
Hey there @dwurf !
I've been meaning to do the same for KF-1 for a long time, and thanks to your work + another repo i've finally released a KF1-Docker version with almost same customizations. I just wanted to thankyou ^_^
You may link it if you want in your own page as well. Here's the repo Docker-kf-1
I'm having issues downloading workshop files on this image, is this normal or am I misconfiguring something? I've done all of the config files correctly but it seems like the server isn't even getting the files as they don't show up in the files. Anyone else having this issue or is it just me? excellent container other than that big caveat though! I have a feeling this is an issue with the current version of the game but not sure.
lib.curl.so.4 cannot open shared object file: no such file or directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.