From 23e0474ee47d577a5dea07bfd981797d936a88ff Mon Sep 17 00:00:00 2001 From: Jose Jimenez Date: Fri, 17 Jan 2025 15:08:19 +0100 Subject: [PATCH] Update readme. Dockerfile simplified. Crossfire only setup in place. --- Dockerfile | 34 +++------------------ README.md | 44 +++++++++++---------------- valve/addons/amxmodx/configs/maps.ini | 22 +++++++------- valve/default.cfg | 6 +++- 4 files changed, 37 insertions(+), 69 deletions(-) diff --git a/Dockerfile b/Dockerfile index 27383fb..adec61b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,41 +1,19 @@ +# Custom half life server - Steam & No Steam classic +# pre 2024 anniversary patches edition + FROM debian:buster-slim ARG hlds_build=7882 ARG metamod_version=1.21p38 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 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 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 apt-get -y update && apt-get install -y --no-install-recommends \ - 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/* +RUN apt-get -y update && apt-get install -y ca-certificates curl lib32gcc1 unzip xz-utils zip USER 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 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 # Copy default config diff --git a/README.md b/README.md index fed378c..dd60fe6 100644 --- a/README.md +++ b/README.md @@ -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) -[![HitCount](http://hits.dwyl.com/artkirienko/hlds-docker-dproto.svg)](http://hits.dwyl.com/artkirienko/hlds-docker-dproto) +[![GitHub Actions Docker Image CI](https://github.com/jjsalinas/hlds-server/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/jjsalians/hl-server/actions) ![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 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 -half-life clients can connect and play together! You don't need to know -anything about Linux or HLDS to start a server. You just need Docker and +Deathmatch Dedicated Server (HLDS).
+Both Steam and noSteam, old and new half-life clients can connect and play together!
+You don't need to know anything about Linux or HLDS to start a server. You just need Docker and this image. ## Quick Start -Start a new server by running: +Build the image `hlds`: ```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) @@ -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**, 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 included), so your game server appear in game server browser of all the clients * Minimal config present, such as `mp_timelimit` and mapcycle -## Default mapcycle - +## Default mapcycle - crossfire 24/7 * crossfire -* bounce -* datacore -* frenzy -* gasworks -* lambda_bunker -* rapidcore -* snark_pit -* stalkyard -* subtransit -* undertow -* boot_camp + ## 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: ```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 ``` diff --git a/valve/addons/amxmodx/configs/maps.ini b/valve/addons/amxmodx/configs/maps.ini index fe81ab5..d7749bf 100644 --- a/valve/addons/amxmodx/configs/maps.ini +++ b/valve/addons/amxmodx/configs/maps.ini @@ -6,14 +6,14 @@ ; Delete this file to use mapcycle.txt crossfire -bounce -datacore -frenzy -gasworks -lambda_bunker -rapidcore -snark_pit -stalkyard -subtransit -undertow -boot_camp +; bounce +; datacore +; frenzy +; gasworks +; lambda_bunker +; rapidcore +; snark_pit +; stalkyard +; subtransit +; undertow +; boot_camp diff --git a/valve/default.cfg b/valve/default.cfg index 556e9c5..bcecabb 100644 --- a/valve/default.cfg +++ b/valve/default.cfg @@ -2,7 +2,7 @@ mapchangecfgfile server.cfg motdfile motd.txt -hostname "HLDS Docker dproto(47/48)" +hostname "Half Life SERVERNAME" maxplayers 12 mp_autocrosshair "0" @@ -45,3 +45,7 @@ sv_downloadurl "http://files2.hldm.org/hl/" // load ban files exec listip.cfg exec banned.cfg + +// password +// password 1 +// vs_password YOURPASSWORD