Public | Automated Build

Last pushed: 3 years ago
Short Description
Team Fortress 2 Server
Full Description

Team Fortress 2 Server Dockerfile

This repository contains Dockerfile of Team Fortress 2 Server for Docker published to the public Docker Hub Registry.

Base Docker Image


  1. Install Docker.

  2. 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"


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 -port 27015 +clientport 27005 +tv_port 27020 \
+map cp_badlands +servercfgfile tf2-server.cfg -maxplayers 16

Preparation (Downloading the files onto your volume)

  1. Copy /tf2server to ~/tf2server

  2. ./tf2server install

  3. Answer some questions

  4. You can test everything went well with ./tf2server start followed by ./tf2server details.

  5. 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.

Docker Pull Command
Source Repository