Skip to content
This repository was archived by the owner on Jan 4, 2024. It is now read-only.

Commit e5b6a00

Browse files
Merge pull request #17 from Project-Unison/dev
TF2Classic-Docker 12.1
2 parents 1428002 + 520a572 commit e5b6a00

File tree

4 files changed

+33
-30
lines changed

4 files changed

+33
-30
lines changed

.github/workflows/docker-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Docker Image CI
22

33
on:
44
push:
5-
branches: [ "bookworm" ]
5+
branches: [ "bookworm-core" ]
66
pull_request:
7-
branches: [ "bookworm" ]
7+
branches: [ "bookworm-core" ]
88

99
jobs:
1010

.github/workflows/docker-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ on:
99
schedule:
1010
- cron: '40 16 * * *'
1111
push:
12-
branches: [ "bookworm" ]
12+
branches: [ "bookworm-core" ]
1313
# Publish semver tags as releases.
1414
tags: [ 'v*.*.*' ]
1515
pull_request:
16-
branches: [ "bookworm" ]
16+
branches: [ "bookworm-core" ]
1717

1818
env:
1919
# Use docker.io for Docker Hub if empty

Dockerfile

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
# ----------------------------------
2-
# Pterodactyl Panel Dockerfile
3-
# Environment: Team Fortress 2 Classic
2+
# TF2Classic-Docker - A modification of pterodactyl's dockerfile.
3+
# Originally created by Pterodactyl, Modified by sapphonie and Roon
4+
# Some codes brought from https://github.com/joshuafhiggins/TF2-Classic, thank you!
5+
# Environment: TF2 Classic
46
# ----------------------------------
57
FROM debian:bookworm-slim
68

7-
LABEL author="Pterodactyl Software - edited by sapphonie and Roon" maintainer="https://github.com/RoonMoonlight"
9+
LABEL author="Pterodactyl Software, sapphonie, Roon" maintainer="https://github.com/RoonMoonlight"
810

911
ENV DEBIAN_FRONTEND noninteractive
1012
ENV TERM screen
1113

1214
# Upgrade our base system first
13-
RUN tput setaf 2; echo "TF2C Docker Script 12 'Bookworm' by Roon - a modification of Pterodactyl Docker File by Pterodactyl Software and sapphonie"; echo "Upgrading base image..."; tput sgr0; \
14-
apt-get update \
15-
&& apt-get upgrade -y --no-install-recommends
15+
RUN tput setaf 2; echo "TF2Classic-Docker 12.1 'Dark Cat' - A modification of pterodactyl's dockerfile by Roon. Originally created by Pterodactyl Software and sapphonie"; echo "Upgrading base image..."; tput sgr0; \
16+
apt update \
17+
&& apt upgrade -y --no-install-recommends
1618

1719
# from postgressql - set up en_US.UTF8 locale so srcds doesn't whine
1820
# https://github.com/docker-library/postgres/blob/69bc540ecfffecce72d49fa7e4a46680350037f9/9.6/Dockerfile#L21-L24
1921
RUN tput setaf 2; echo "Setting en_US.UTF8 locale..."; tput sgr0; \
20-
apt-get update \
21-
&& apt-get install -y locales \
22+
apt update \
23+
&& apt install -y locales \
2224
&& rm -rf /var/lib/apt/lists/* \
2325
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
2426

@@ -27,16 +29,16 @@ ENV LANG en_US.utf8
2729
# install deps
2830
RUN tput setaf 2; echo "Installing dependencies..."; tput sgr0; \
2931
dpkg --add-architecture i386 \
30-
&& apt-get update \
31-
&& apt-get install -y --no-install-recommends \
32+
&& apt update \
33+
&& apt install -y --no-install-recommends \
3234
# needed for ip route stuff in entrypoint.sh
3335
net-tools iproute2 \
34-
# For TF2C dependencies
35-
unzip aria2 lib32z1 libncurses5:i386 libbz2-1.0:i386 lib32gcc-s1 lib32stdc++6 libtinfo5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 libcurl4-gnutls-dev libcurl4-gnutls-dev:i386 libxcb1 libxcb1:i386 \
36+
# For SRCDS dependencies
37+
lib32z1 libbz2-1.0:i386 lib32gcc-s1 lib32stdc++6 libncurses5:i386 libsdl2-2.0-0:i386 lib32stdc++6 libtinfo5:i386 libcurl4-gnutls-dev:i386 \
3638
# needed for some sourcemod extensions
3739
curl wget libcurl4:i386 \
3840
# helpful tools
39-
python3 valgrind gdb tmux nano \
41+
python3 valgrind gdb tmux nano software-properties-common \
4042
# needed for steamcmd
4143
ca-certificates
4244

@@ -56,3 +58,9 @@ WORKDIR /home/container
5658

5759
COPY ./entrypoint.sh /entrypoint.sh
5860
CMD ["/bin/bash", "/entrypoint.sh"]
61+
62+
# Expose ports
63+
EXPOSE 27015/tcp \
64+
27015/udp \
65+
27020/udp
66+

README.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
# ⚠️ Notice: Podman support is dropped ⚠️
2-
**As of August 16, 2023, Podman support is dropped due to several issues that prevents me from using it and Docker is known to be widely used for production use. Podman should work as intended but NO support will be given regardless of the result. I advise you to use the Docker instead of podman. Thanks for understanding!**
31

4-
# Source Engine Docker Container
2+
# TF2Classic Docker Container
53
[Pterodactyl Panel](https://pterodactyl.io/) docker source engine image, originally forked from [their upstream](https://github.com/parkervcp/images/tree/ubuntu/source), but cleaned up and converted to use debian-slim and less dependencies, saving ~300MB per server instance.
64

7-
This is modification of @sapphonie's srcds Dockerfiles, originally designed for TF2C compatibility but expanded with more features.
5+
This is modification of @sapphonie's srcds Dockerfiles, with TF2 Classic compatibility.
86

97
Note: this container can run bash if no args are passed or if `bash` is passed in the startup options.
108

119
## Difference with sapphonie's Dockerfiles
12-
* Supports most Source Engine servers. Source 2 support is planned in the future.
1310
* Compatible with latest Debian-slim releases.
1411
* Adds useful tools `tmux` and `nano` included by default.
15-
* Adds [Team Fortress 2 Classic](https://tf2classic.com) support.
12+
* Designed for [Team Fortress 2 Classic](https://tf2classic.com) support.
1613

1714
## Requirements
1815
* Any Linux server distros
@@ -21,21 +18,19 @@ Note: this container can run bash if no args are passed or if `bash` is passed i
2118
## How to use
2219
Due to trouble with Docker Desktop, we use [GitHub Docker Packages](https://github.com/features/packages) for automated creation.
2320

21+
### Use with Docker
22+
As of Dec 15 2023, the core version is deprecated and will no longer receive any updates to focus more on TF2Classic.
23+
2424
To allow anyone to join your server, don't forget to expose your port (By default it is 27015 but can be changed) before creating the docker instances. Using the rcon is highly discouraged so only UDP ports are allowed, but if you are okay with rcon, remove `/udp` after the port to allow rcon access.
2525

2626
### Use with Docker
2727
#### For most Source Engine servers
2828
```
29-
docker run -it --name srcdsserver -p 27015:27015/udp --restart unless-stopped ghcr.io/roonmoonlight/srcds-tf2c-debian:bookworm-core
30-
```
31-
32-
#### For Team Fortress 2 Classic servers
33-
```
34-
docker run -it --name tf2cserver -p 27015:27015/udp --restart unless-stopped ghcr.io/roonmoonlight/srcds-tf2c-debian:bookworm
29+
docker run -it --name tf2cserver --restart unless-stopped ghcr.io/roonmoonlight/srcds-tf2c-debian:latest
3530
```
3631

3732
## Note
38-
* This Docker scripts only prepares every dependencies to install any Source Games Server, and does NOT automatically install server. Please refer to each game's Documentations for installation. For easier alternatives, using LinuxGSM's [docker-gameserver](https://github.com/GameServerManagers/docker-gameserver) is highly recommended.
33+
* This Docker scripts only prepares every dependencies to install TF2Classic Server, and does NOT automatically install server. Please refer to [official installation guide](https://wiki.tf2classic.com/wiki/Dedicated_Linux_server) for detailed instruction.
3934

4035
## License
4136
This project is licensed under MIT License.

0 commit comments

Comments
 (0)