Update readme. Dockerfile simplified. Crossfire only setup in place.

This commit is contained in:
2025-01-17 15:08:19 +01:00
parent 6a23db18b9
commit 23e0474ee4
4 changed files with 37 additions and 69 deletions

View File

@@ -1,41 +1,19 @@
# Custom half life server - Steam & No Steam classic
# pre 2024 anniversary patches edition
FROM debian:buster-slim FROM debian:buster-slim
ARG hlds_build=7882 ARG hlds_build=7882
ARG metamod_version=1.21p38 ARG metamod_version=1.21p38
ARG amxmod_version=1.8.2 ARG amxmod_version=1.8.2
ARG jk_botti_version=1.43
ARG steamcmd_url=https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz ARG steamcmd_url=https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
ARG hlds_url="https://github.com/DevilBoy-eXe/hlds/releases/download/$hlds_build/hlds_build_$hlds_build.zip" ARG hlds_url="https://github.com/DevilBoy-eXe/hlds/releases/download/$hlds_build/hlds_build_$hlds_build.zip"
ARG metamod_url="https://github.com/Bots-United/metamod-p/releases/download/v$metamod_version/metamod_i686_linux_win32-$metamod_version.tar.xz" ARG metamod_url="https://github.com/Bots-United/metamod-p/releases/download/v$metamod_version/metamod_i686_linux_win32-$metamod_version.tar.xz"
ARG amxmod_url="http://www.amxmodx.org/release/amxmodx-$amxmod_version-base-linux.tar.gz" ARG amxmod_url="http://www.amxmodx.org/release/amxmodx-$amxmod_version-base-linux.tar.gz"
ARG jk_botti_url="http://koti.kapsi.fi/jukivili/web/jk_botti/jk_botti-$jk_botti_version-release.tar.xz"
# Fix warning:
# WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'.
# International characters may not work.
RUN apt-get update && apt-get install -y --no-install-recommends \
locales=2.28-10 \
&& rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf8
ENV LC_ALL en_US.UTF-8
# Fix error:
# Unable to determine CPU Frequency. Try defining CPU_MHZ.
# Exiting on SPEW_ABORT
ENV CPU_MHZ=2300
RUN groupadd -r steam && useradd -r -g steam -m -d /opt/steam steam RUN groupadd -r steam && useradd -r -g steam -m -d /opt/steam steam
RUN apt-get -y update && apt-get install -y --no-install-recommends \ RUN apt-get -y update && apt-get install -y ca-certificates curl lib32gcc1 unzip xz-utils zip
ca-certificates=20190110 \
curl=7.64.0-4+deb10u1 \
lib32gcc1=1:8.3.0-6 \
unzip=6.0-23+deb10u1 \
xz-utils=5.2.4-1 \
zip=3.0-11+b1 \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
USER steam USER steam
WORKDIR /opt/steam WORKDIR /opt/steam
@@ -82,10 +60,6 @@ COPY lib/dproto/amxx/* /opt/steam/hlds/valve/addons/amxmodx/scripting/
COPY lib/bind_key/amxx/bind_key.amxx /opt/steam/hlds/valve/addons/amxmodx/plugins/bind_key.amxx COPY lib/bind_key/amxx/bind_key.amxx /opt/steam/hlds/valve/addons/amxmodx/plugins/bind_key.amxx
RUN echo 'bind_key.amxx ; binds keys for voting' >> /opt/steam/hlds/valve/addons/amxmodx/configs/plugins.ini RUN echo 'bind_key.amxx ; binds keys for voting' >> /opt/steam/hlds/valve/addons/amxmodx/configs/plugins.ini
# Install jk_botti
RUN curl -sqL "$jk_botti_url" | tar -C /opt/steam/hlds/valve/ -xJ \
&& echo 'linux addons/jk_botti/dlls/jk_botti_mm_i386.so' >> /opt/steam/hlds/valve/addons/metamod/plugins.ini
WORKDIR /opt/steam/hlds WORKDIR /opt/steam/hlds
# Copy default config # Copy default config

View File

@@ -1,30 +1,33 @@
[![GitHub Actions Docker Image CI](https://github.com/artkirienko/hlds-docker-dproto/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/artkirienko/hlds-docker-dproto/actions) [![GitHub Actions Docker Image CI](https://github.com/jjsalinas/hlds-server/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/jjsalians/hl-server/actions)
[![HitCount](http://hits.dwyl.com/artkirienko/hlds-docker-dproto.svg)](http://hits.dwyl.com/artkirienko/hlds-docker-dproto)
![banner](banner.png) ![banner](banner.png)
# HLDS Docker dproto(47/48 Steam+noSteam) # HLDS Docker dproto(47/48 Steam+noSteam) - Crossfire 24/7
## Half-Life Dedicated Server as a Docker image ## Half-Life Dedicated Server as a Docker image
Probably the fastest and easiest way to set up an old-school Half-Life Probably the fastest and easiest way to set up an old-school Half-Life
Deathmatch Dedicated Server (HLDS). Both Steam and noSteam, old and new Deathmatch Dedicated Server (HLDS). <br>
half-life clients can connect and play together! You don't need to know Both Steam and noSteam, old and new half-life clients can connect and play together!<br>
anything about Linux or HLDS to start a server. You just need Docker and You don't need to know anything about Linux or HLDS to start a server. You just need Docker and
this image. this image.
## Quick Start ## Quick Start
Start a new server by running: Build the image `hlds`:
```bash ```bash
docker run -it --rm -d -p27015:27015 -p27015:27015/udp artkirienko/hlds docker build -t hlds .
``` ```
Change the player slot size, map or `rcon_password` by running: Run your image
```bash
docker run -it --rm -d --name hlds -p27015:27015 -p27015:27015/udp
``` ```
docker run -it --rm -d --name hlds -p27015:27015 -p27015:27015/udp artkirienko/hlds +map crossfire +maxplayers 12 +rcon_password SECRET_PASSWORD
You can add extra parameters when starting the image
```bash
docker run -it --rm --name hlds -p27015:27015 -p27015:27015/udp hlds +map crossfire +maxplayers 16 +password 1 +vs_password "password"
``` ```
> **Note:** Any [server config command](http://sr-team.clan.su/K_stat/hlcommandsfull.html) > **Note:** Any [server config command](http://sr-team.clan.su/K_stat/hlcommandsfull.html)
@@ -48,27 +51,14 @@ docker run -it --rm -d --name hlds -p27015:27015 -p27015:27015/udp artkirienko/h
* **dproto** version `0.9.582`. This is the last version of **dproto**, * **dproto** version `0.9.582`. This is the last version of **dproto**,
the project is abandoned. the project is abandoned.
* [jk_botti](https://github.com/Bots-United/jk_botti) version `1.43`
* Patched list of master servers (official and unofficial master servers * Patched list of master servers (official and unofficial master servers
included), so your game server appear in game server browser of all the clients included), so your game server appear in game server browser of all the clients
* Minimal config present, such as `mp_timelimit` and mapcycle * Minimal config present, such as `mp_timelimit` and mapcycle
## Default mapcycle ## Default mapcycle - crossfire 24/7
* crossfire * crossfire
* bounce
* datacore
* frenzy
* gasworks
* lambda_bunker
* rapidcore
* snark_pit
* stalkyard
* subtransit
* undertow
* boot_camp
## Advanced ## Advanced
@@ -77,5 +67,5 @@ to `valve/config/server.cfg` of this project and mount the directory as volume
to `/opt/steam/hlds/valve/config` by running: to `/opt/steam/hlds/valve/config` by running:
```bash ```bash
docker run -it --rm -d -p27015:27015 -p27015:27015/udp -v $(pwd)/valve/config:/opt/steam/hlds/valve/config artkirienko/hlds docker run -it --rm -d -p27015:27015 -p27015:27015/udp -v $(pwd)/valve/config:/opt/steam/hlds/valve/config hlds
``` ```

View File

@@ -6,14 +6,14 @@
; Delete this file to use mapcycle.txt ; Delete this file to use mapcycle.txt
crossfire crossfire
bounce ; bounce
datacore ; datacore
frenzy ; frenzy
gasworks ; gasworks
lambda_bunker ; lambda_bunker
rapidcore ; rapidcore
snark_pit ; snark_pit
stalkyard ; stalkyard
subtransit ; subtransit
undertow ; undertow
boot_camp ; boot_camp

View File

@@ -2,7 +2,7 @@
mapchangecfgfile server.cfg mapchangecfgfile server.cfg
motdfile motd.txt motdfile motd.txt
hostname "HLDS Docker dproto(47/48)" hostname "Half Life SERVERNAME"
maxplayers 12 maxplayers 12
mp_autocrosshair "0" mp_autocrosshair "0"
@@ -45,3 +45,7 @@ sv_downloadurl "http://files2.hldm.org/hl/"
// load ban files // load ban files
exec listip.cfg exec listip.cfg
exec banned.cfg exec banned.cfg
// password
// password 1
// vs_password YOURPASSWORD