This repository contains Dockerfile of Team Fortress 2 Server for Docker published to the public Docker Hub Registry.
Install Docker.
Download automated build from public Docker Hub Registry: docker pull johnjelinek/tf2server
(alternatively, you can build an image from Dockerfile: docker build -t="johnjelinek/tf2server" github.com/johnjelinek/tf2server-docker)
docker run -dt --name tf2 -v /var/docker/tf2server:/home/tf2server -p 27015:27015 \
-p 27015:27015/udp --entrypoint /home/tf2server/serverfiles/srcds_run johnjelinek/tf2server \
-game tf -strictportbind -ip 0.0.0.0 -port 27015 +clientport 27005 +tv_port 27020 \
+map cp_badlands +servercfgfile tf2-server.cfg -maxplayers 16
Copy /tf2server to ~/tf2server
./tf2server install
Answer some questions
You can test everything went well with ./tf2server start followed by ./tf2server details.
If everything looks good, run with the command listed under Usage.
From Steam Menu, View > Servers > Add yourServerIP server as a favorite and double click to join.
Content type
Image
Digest
sha256:8297ec146…
Size
107.7 MB
Last updated
almost 11 years ago
docker pull johnjelinek/tf2server