From 85a2e8fccc3a6d249f03b11ea1c4b110c03d89ec Mon Sep 17 00:00:00 2001 From: Joel Timothy Oh Date: Sat, 11 Nov 2023 15:27:35 +0000 Subject: [PATCH] Feature (ci): Add `srcds/cs2` support - Bump base image in `build/Dockerfile` to `startersclan/steamcmd:git-20231109.0.0` - Add custom `build` and `test` steps for `srcds/cs2` - Add working command-line and `docker-compose` examples - Update documentation on `srcds/cs2` Co-authored-by: Leonard Jonathan Oh --- .../Generate-GameImageRepositoryReadme.ps1 | 4 + .github/workflows/ci-master-pr.yml | 13 +- README.md | 15 +++ build.sh | 39 +++++- build/Dockerfile | 49 +++++-- docs/image/readme/srcds-cs2.md | 35 +++++ .../docker-compose/docker-compose.bash-c.yml | 15 +++ .../docker-compose/docker-compose.binary.yml | 11 ++ test/srcds-cs2 | 127 ++++++++++++++++++ test/srcds-cs2-query | Bin 0 -> 106 bytes test/test-game-image-game-version.sh | 17 ++- test/test-game-image.sh | 1 + update/Dockerfile | 38 ++++-- 13 files changed, 329 insertions(+), 35 deletions(-) create mode 100644 docs/image/readme/srcds-cs2.md create mode 100644 test/srcds-cs2 create mode 100644 test/srcds-cs2-query diff --git a/.generate/Generate-GameImageRepositoryReadme.ps1 b/.generate/Generate-GameImageRepositoryReadme.ps1 index a556923b..e97c1bb2 100644 --- a/.generate/Generate-GameImageRepositoryReadme.ps1 +++ b/.generate/Generate-GameImageRepositoryReadme.ps1 @@ -4,6 +4,10 @@ $gameList = @( EngineFullName = 'Source' RegistryNamespace = 'sourceservers' Game = @( + @{ + Name = 'cs2' + FullName = 'Counter-Strike 2' + } @{ Name = 'csgo' FullName = 'Counter-Strike: Global Offensive' diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml index 9dffc7c8..87d29f90 100644 --- a/.github/workflows/ci-master-pr.yml +++ b/.github/workflows/ci-master-pr.yml @@ -46,6 +46,14 @@ jobs: STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }} STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} + test-game-image-game-version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Test + run: | + ./test/test-game-image-game-version.sh + update-draft-release: needs: - test-build-hlds @@ -128,8 +136,11 @@ jobs: strategy: matrix: ENGINE: [srcds] - GAME: [csgo, cstrike, dod, hl2mp, left4dead, left4dead2, tf] + GAME: [cs2, csgo, cstrike, dod, hl2mp, left4dead, left4dead2, tf] include: + - ENGINE: srcds + GAME: cs2 + GAME_FULLNAME: 'Counter-Strike 2' - ENGINE: srcds GAME: csgo GAME_FULLNAME: 'Counter-Strike: Global Offensive' diff --git a/README.md b/README.md index a4ba7275..36c25d01 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ Dedicated servers hosted on Steam are usually required to be running the *latest | Game | Image | Tag `v` | Size | |:-:|:-:|:-:|:-:| +| Counter-Strike 2 | [`sourceservers/cs2`][srcds-cs2-dockerhub-link] | [![srcds-cs2-version-badge][]][srcds-cs2-metadata-link] | [![srcds-cs2-size-badge][]][srcds-cs2-metadata-link] | [![srcds-cs2-layers-badge][]][srcds-cs2-metadata-link] | | Counter-Strike: Global Offensive | [`sourceservers/csgo`][srcds-csgo-dockerhub-link] | [![srcds-csgo-version-badge][]][srcds-csgo-metadata-link] | [![srcds-csgo-size-badge][]][srcds-csgo-metadata-link] | [![srcds-csgo-layers-badge][]][srcds-csgo-metadata-link] | | Counter-Strike: Source | [`sourceservers/cstrike`][srcds-cstrike-dockerhub-link] | [![srcds-cstrike-version-badge][]][srcds-cstrike-metadata-link] | [![srcds-cstrike-size-badge][]][srcds-cstrike-metadata-link] | [![srcds-cstrike-layers-badge][]][srcds-cstrike-metadata-link] | | Day of Defeat: Source | [`sourceservers/dod`][srcds-dod-dockerhub-link] | [![srcds-dod-version-badge][]][srcds-dod-metadata-link] | [![srcds-dod-size-badge][]][srcds-dod-metadata-link] | [![srcds-dod-layers-badge][]][srcds-dod-metadata-link] | @@ -61,6 +62,11 @@ Dedicated servers hosted on Steam are usually required to be running the *latest | Left 4 Dead 2 | [`sourceservers/left4dead2`][srcds-left4dead2-dockerhub-link] | [![srcds-left4dead2-version-badge][]][srcds-left4dead2-metadata-link] | [![srcds-left4dead2-size-badge][]][srcds-left4dead2-metadata-link] | [![srcds-left4dead2-layers-badge][]][srcds-left4dead2-metadata-link] | | Team Fortress 2 | [`sourceservers/tf`][srcds-tf-dockerhub-link] | [![srcds-tf-version-badge][]][srcds-tf-metadata-link] | [![srcds-tf-size-badge][]][srcds-tf-metadata-link] | [![srcds-tf-layers-badge][]][srcds-tf-metadata-link] | +[srcds-cs2-dockerhub-link]: https://hub.docker.com/r/sourceservers/cs2 +[srcds-cs2-version-badge]: https://img.shields.io/docker/v/sourceservers/cs2/latest?label=&style=flat-square +[srcds-cs2-size-badge]: https://img.shields.io/docker/image-size/sourceservers/cs2/latest?label=&style=flat-square +[srcds-cs2-metadata-link]: https://hub.docker.com/r/sourceservers/cs2/tags + [srcds-csgo-dockerhub-link]: https://hub.docker.com/r/sourceservers/csgo [srcds-csgo-version-badge]: https://img.shields.io/docker/v/sourceservers/csgo/latest?label=&style=flat-square [srcds-csgo-size-badge]: https://img.shields.io/docker/image-size/sourceservers/csgo/latest?label=&style=flat-square @@ -194,6 +200,15 @@ The default [work directory](build/Dockerfile#L112) for all the images is [`/ser ##### Via command-line ```shell +# Counter-Strike 2 +## Via default entrypoint (/bin/bash -c) +docker run -it --rm -p 27015:27015/tcp -p 27015:27015/udp sourceservers/cs2:latest 'game/bin/linuxsteamrt64/cs2 -dedicated -port 27015 +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2' +docker run -it --rm -p 27015:27015/tcp -p 27015:27015/udp sourceservers/cs2:latest 'printenv && ls -al && exec game/bin/linuxsteamrt64/cs2 -dedicated -port 27015 +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2' +## Via custom entrypoint (game binary) +docker run -it --rm -p 27015:27015/tcp -p 27015:27015/udp --entrypoint game/bin/linuxsteamrt64/cs2 sourceservers/cs2:latest -dedicated -port 27015 +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2 +## Via custom entrypoint (/bin/bash) +docker run -it --rm -p 27015:27015/tcp -p 27015:27015/udp --entrypoint /bin/bash sourceservers/cs2:latest -c 'printenv && ls -al && exec game/bin/linuxsteamrt64/cs2 -dedicated -port 27015 +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2' + # Counter-Strike: Global Offensive ## Via default entrypoint (/bin/bash -c) docker run -it --rm -p 27015:27015/tcp -p 27015:27015/udp sourceservers/csgo:latest 'srcds_linux -game csgo -port 27015 +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2' diff --git a/build.sh b/build.sh index 40b62c52..8e794bd7 100755 --- a/build.sh +++ b/build.sh @@ -163,7 +163,12 @@ if [ "$APPID" = 90 ]; then else DOCKER_REPOSITORY="${DOCKER_REPOSITORY:-${REGISTRY_SOURCE:?err}/$GAME}" GAME_ENGINE='srcds' - GAME_BIN='srcds_linux' + # srcds/cs2 + if [ "$APPID" = 730 ]; then + GAME_BIN='game/bin/linuxsteamrt64/cs2' + else + GAME_BIN='srcds_linux' + fi fi if [ "$PIPELINE" = 'build' ]; then GAME_IMAGE_CLEAN="$DOCKER_REPOSITORY:$GAME_VERSION" @@ -264,16 +269,38 @@ if [ ! "$NO_TEST" = 'true' ]; then date time docker run -t --rm "$GAME_IMAGE" 'printenv && ls -al' date - time docker run -t --rm "$GAME_IMAGE" "$GAME_BIN -game $GAME +version +exit" | tee "$TEST_DIR/test" + # srcds/cs2 + if [ "$APPID" = 730 ]; then + CONTAINER_ID=$( docker run -itd "$GAME_IMAGE" "$GAME_BIN -dedicated -port 27015 +map de_dust2" ) + i=0; while [ "$i" -lt 30 ]; do + echo "Waiting for server to start" + docker container inspect -f '{{.State.Running}}' "$CONTAINER_ID" | grep '^true$' > /dev/null || break + docker logs "$CONTAINER_ID" | grep 'VAC secure mode is activated' && break || sleep 1 + i=$(($i + 1)) + done + docker logs "$CONTAINER_ID" + docker exec -it "$CONTAINER_ID" bash -c 'printf "\\xff\\xff\\xff\\xffTSource Engine Query\\x00" | nc -w1 -u 127.0.0.1 27015 | tr "[:cntrl:]" "\\n"' | tee "$TEST_DIR/test" + docker rm -f "$CONTAINER_ID" > /dev/null + else + time docker run -t --rm "$GAME_IMAGE" "$GAME_BIN -game $GAME +version +exit" | tee "$TEST_DIR/test" + fi date # Verify game version of the game image matches the value of GAME_VERSION echo 'Verifying game image game version' - GAME_IMAGE_VERSION_LINES=$( cat "$TEST_DIR/test" | grep -iE '\bexe\b|version' | sed 's/[^0-9]//g' ) - if ! echo "$GAME_IMAGE_VERSION_LINES" | grep -E "^$GAME_VERSION" > /dev/null; then + GAME_IMAGE_VERSION_LINES=$( + if [ "$APPID" = 730 ]; then + cat "$TEST_DIR/test" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' + else + cat "$TEST_DIR/test" | grep -iE '\bexe\b|version' + fi + ) + echo 'GAME_IMAGE_VERSION_LINES:' + echo "$GAME_IMAGE_VERSION_LINES" + if echo "$GAME_IMAGE_VERSION_LINES" | sed 's/[^0-9]//g' | grep -E "^$GAME_VERSION" > /dev/null; then + echo "Game version matches GAME_VERSION=$GAME_VERSION" + else echo "Game version does not match GAME_VERSION=$GAME_VERSION" - echo 'GAME_IMAGE_VERSION_LINES:' - echo "$GAME_IMAGE_VERSION_LINES" exit 1 fi rm -f "$TEST_DIR/test" diff --git a/build/Dockerfile b/build/Dockerfile index 99315f87..3e52838d 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -2,7 +2,7 @@ # Builds a clean image containing the latest version of the specified game. -FROM startersclan/steamcmd:git-20190605.0.0 +FROM startersclan/steamcmd:git-20231109.0.0 ARG SERVER_DIR=/server ARG APPMANIFEST_AR_URL=https://github.com/startersclan/hlds-appmanifest/archive/refs/tags/v2.0.0.tar.gz @@ -75,22 +75,36 @@ RUN --mount=type=secret,id=STEAM_USERNAME \ fi; \ done; \ echo "[BUILD] Performing cleanup"; \ - cd "$STEAMCMD_DIR" && rm -rf \ - linux64 \ - package \ - public \ - siteserverui \ - steam \ - linux32/libtier0_s.so \ - linux32/libvstdlib_s.so \ - linux32/steamclient.so \ - linux32/steamconsole.so \ - update_hosts_cached.vdf; \ - rm -rf /root/.steam; \ + # Clean up a different set of files for srcds/cs2 + if [ "$APPID" = 730 ]; then \ + cd "$STEAMCMD_DIR" && rm -rf \ + package \ + public \ + siteserverui \ + steam \ + linux32/libtier0_s.so \ + linux32/libvstdlib_s.so \ + linux32/steamconsole.so \ + update_hosts_cached.vdf; \ + else \ + cd "$STEAMCMD_DIR" && rm -rf \ + linux64 \ + package \ + public \ + siteserverui \ + steam \ + linux32/libtier0_s.so \ + linux32/libvstdlib_s.so \ + linux32/steamclient.so \ + linux32/steamconsole.so \ + update_hosts_cached.vdf; \ + rm -rf /root/.steam; \ + fi; \ if [ "$APPID" = 90 ]; then \ # Retain `/root/Steam/appcache` to prevent `steamcmd` from re-downloading `hlds` game entirely on game updates rm -rf $( find /root/Steam -mindepth 1 -maxdepth 1 | grep -v '^/root/Steam/appcache' ); \ else \ + # Cleanup. This also cleans up user data rm -rf /root/Steam; \ fi; @@ -98,7 +112,14 @@ RUN --mount=type=secret,id=STEAM_USERNAME \ RUN echo "[BUILD] Applying game fixes"; \ # Create steam_appid.txt containing the game's appid to prevent crashes on first run echo "[BUILD] CLIENT_APPID: $CLIENT_APPID"; \ - echo "$CLIENT_APPID" > "$SERVER_DIR/steam_appid.txt" + echo "$CLIENT_APPID" > "$SERVER_DIR/steam_appid.txt"; \ + # Create necessary symlinks for srcds/cs2 + if [ "$APPID" = 730 ]; then \ + mkdir -p /root/.steam/sdk64; \ + mkdir -p /root/.steam/sdk32; \ + ln -sf "/$STEAMCMD_DIR/linux64/steamclient.so" /root/.steam/sdk64/steamclient.so; \ + ln -sf "/$STEAMCMD_DIR/linux32/steamclient.so" /root/.steam/sdk32/steamclient.so; \ + fi; # For directly running the hlds_linux / srcds_linux binary ENV LD_LIBRARY_PATH .:bin:$LD_LIBRARY_PATH diff --git a/docs/image/readme/srcds-cs2.md b/docs/image/readme/srcds-cs2.md new file mode 100644 index 00000000..3b5c40e0 --- /dev/null +++ b/docs/image/readme/srcds-cs2.md @@ -0,0 +1,35 @@ +| `master` | `build` | `update` | +|:-:|:-:|:-:| +[![pipeline-github-master-badge][]][pipeline-github-master-link] | [![pipeline-travis-build-badge][]][pipeline-travis-build-link] [![pipeline-azurepipelines-build-badge][]][pipeline-azurepipelines-build-link] [![pipeline-circleci-build-badge][]][pipeline-circleci-build-link] [![pipeline-gitlab-build-badge][]][pipeline-gitlab-build-link] | [![pipeline-travis-update-badge][]][pipeline-travis-update-link] [![pipeline-azurepipelines-update-badge][]][pipeline-azurepipelines-update-link] [![pipeline-circleci-update-badge][]][pipeline-circleci-update-link] [![pipeline-gitlab-update-badge][]][pipeline-gitlab-update-link] + +[pipeline-github-master-badge]: https://img.shields.io/github/actions/workflow/status/startersclan/docker-sourceservers/ci-master-pr.yml?branch=master&label=&logo=github&style=flat-square +[pipeline-github-master-link]: https://github.com/startersclan/docker-sourceservers/actions?query=branch%3Amaster + +[pipeline-travis-build-badge]: https://img.shields.io/travis/com/startersclan/docker-sourceservers/build.svg?label=&logo=travis&style=flat-square +[pipeline-travis-build-link]: https://app.travis-ci.com/startersclan/docker-sourceservers/builds +[pipeline-travis-update-badge]: https://img.shields.io/travis/com/startersclan/docker-sourceservers/update.svg?label=&logo=travis&style=flat-square +[pipeline-travis-update-link]: https://app.travis-ci.com/startersclan/docker-sourceservers/builds + +[pipeline-azurepipelines-build-badge]: https://img.shields.io/azure-devops/build/startersclan/docker-sourceservers/2/build.svg?label=&logo=azure-pipelines&style=flat-square +[pipeline-azurepipelines-build-link]: https://dev.azure.com/startersclan/docker-sourceservers/_build?definitionId=2 +[pipeline-azurepipelines-update-badge]: https://img.shields.io/azure-devops/build/startersclan/docker-sourceservers/3/update.svg?label=&logo=azure-pipelines&style=flat-square +[pipeline-azurepipelines-update-link]: https://dev.azure.com/startersclan/docker-sourceservers/_build?definitionId=3 + +[pipeline-circleci-build-badge]: https://img.shields.io/circleci/build/gh/startersclan/docker-sourceservers/build.svg?label=&logo=circleci&style=flat-square +[pipeline-circleci-build-link]: https://app.circleci.com/pipelines/github/startersclan/docker-sourceservers?branch=build +[pipeline-circleci-update-badge]: https://img.shields.io/circleci/build/gh/startersclan/docker-sourceservers/update.svg?label=&logo=circleci&style=flat-square +[pipeline-circleci-update-link]: https://app.circleci.com/pipelines/github/startersclan/docker-sourceservers?branch=update + +[pipeline-gitlab-build-badge]: https://img.shields.io/gitlab/pipeline-status/startersclan/docker-sourceservers?branch=build&label=&logo=gitlab&style=flat-square +[pipeline-gitlab-build-link]: https://gitlab.com/startersclan/docker-sourceservers/-/pipelines?page=1&scope=all&ref=build +[pipeline-gitlab-update-badge]: https://img.shields.io/gitlab/pipeline-status/startersclan/docker-sourceservers?branch=update&label=&logo=gitlab&style=flat-square +[pipeline-gitlab-update-link]: https://gitlab.com/startersclan/docker-sourceservers/-/pipelines?page=1&scope=all&ref=update + +| Game | Image | Tag `v` | Size | +|:-:|:-:|:-:|:-:| +| Counter-Strike 2 | [`sourceservers/cs2`][srcds-cs2-dockerhub-link] | [![srcds-cs2-version-badge][]][srcds-cs2-metadata-link] | [![srcds-cs2-size-badge][]][srcds-cs2-metadata-link] | [![srcds-cs2-layers-badge][]][srcds-cs2-metadata-link] | + +[srcds-cs2-dockerhub-link]: https://hub.docker.com/r/sourceservers/cs2 +[srcds-cs2-version-badge]: https://img.shields.io/docker/v/sourceservers/cs2/latest?label=&style=flat-square +[srcds-cs2-size-badge]: https://img.shields.io/docker/image-size/sourceservers/cs2/latest?label=&style=flat-square +[srcds-cs2-metadata-link]: https://hub.docker.com/r/sourceservers/cs2/tags diff --git a/docs/samples/docker-compose/docker-compose.bash-c.yml b/docs/samples/docker-compose/docker-compose.bash-c.yml index 2ffe200d..1215debc 100644 --- a/docs/samples/docker-compose/docker-compose.bash-c.yml +++ b/docs/samples/docker-compose/docker-compose.bash-c.yml @@ -1,5 +1,20 @@ version: '2.2' services: + srcds-cs2: + image: sourceservers/cs2:latest + ports: + - 27015:27015/tcp + - 27015:27015/udp + stdin_open: true + tty: true + entrypoint: + - /bin/bash + - -c + command: + - | + set -e + game/bin/linuxsteamrt64/cs2 -dedicated -port 27015 +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2 + srcds-csgo: image: sourceservers/csgo:latest ports: diff --git a/docs/samples/docker-compose/docker-compose.binary.yml b/docs/samples/docker-compose/docker-compose.binary.yml index 30963636..b7a46524 100644 --- a/docs/samples/docker-compose/docker-compose.binary.yml +++ b/docs/samples/docker-compose/docker-compose.binary.yml @@ -1,5 +1,16 @@ version: '2.2' services: + srcds-cs2: + image: sourceservers/cs2:latest + ports: + - 27015:27015/tcp + - 27015:27015/udp + stdin_open: true + tty: true + entrypoint: + - game/bin/linuxsteamrt64/cs2 + command: -dedicated -port 27015 +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2 + srcds-csgo: image: sourceservers/csgo:latest ports: diff --git a/test/srcds-cs2 b/test/srcds-cs2 new file mode 100644 index 00000000..93509d9f --- /dev/null +++ b/test/srcds-cs2 @@ -0,0 +1,127 @@ +Loaded /server/game/bin/linuxsteamrt64/libengine2.so, got 0x559abad212b0 + +Console initialized. +Steam AppId(730), BreakpadId(2347771) +InitSteamLogin_Internal: Initializing breakpad. +Using breakpad crash handler +Steam Universe is invalid, possibly asking before Steam was successfully initialized. +ResetBreakpadAppId: Universe is 0 (k_EUniverseInvalid) +ResetBreakpadAppId: Setting dedicated server app id: 2347773 +Setting breakpad minidump AppID = 2347773 +Forcing breakpad minidump interfaces to load +Looking up breakpad interfaces from steamclient +Calling BreakpadMiniDumpSystemInit +Loaded libSDL3.so.0, got 0x559abae1f8a0 +Loaded /server/game/bin/linuxsteamrt64/libtier0.so, got 0x559abad0af80 +Visibility enabled. +Loaded /server/game/bin/linuxsteamrt64/libfilesystem_stdio.so, got 0x559abae1fd60 +USRLOCAL path not found! +Loaded /server/game/bin/linuxsteamrt64/liblocalize.so, got 0x559abae32270 +Loaded /server/game/bin/linuxsteamrt64/librendersystemempty.so, got 0x559abae44360 +Loaded /server/game/bin/linuxsteamrt64/libresourcesystem.so, got 0x559abae56870 +Loaded /server/game/bin/linuxsteamrt64/libschemasystem.so, got 0x559abae68d80 +Trying to set dxlevel (111) which is higher than the card can support (110)! +Loaded /server/game/bin/linuxsteamrt64/libmaterialsystem2.so, got 0x559abae7ae70 +--------------- +Path ID: File Path: +ADDONS "/server/game/csgo_addons/" +CONTENT "/server/content/csgo/" +CONTENT "/server/content/csgo_imported/" +CONTENT "/server/content/csgo_core/" +CONTENT "/server/content/core/" +CONTENTADDONS "/server/content/csgo_addons/" +CONTENTROOT "/server/content/" +DEFAULT_WRITE_PATH "/server/game/csgo/pak01.vpk" (vpk) /server/game/csgo/pak01.vpk +DEFAULT_WRITE_PATH "/server/game/csgo/" +EXECUTABLE_PATH "/server/game/bin/linuxsteamrt64/" +GAME "/server/game/csgo/pak01.vpk" (vpk) /server/game/csgo/pak01.vpk +GAME "/server/game/csgo_imported/pak01.vpk" (vpk) /server/game/csgo_imported/pak01.vpk +GAME "/server/game/csgo_core/pak01.vpk" (vpk) /server/game/csgo_core/pak01.vpk +GAME "/server/game/core/pak01.vpk" (vpk) /server/game/core/pak01.vpk +GAME "/server/game/csgo/" +GAME "/server/game/csgo_imported/" +GAME "/server/game/csgo_core/" +GAME "/server/game/core/" +GAMEBIN "/server/game/csgo/bin/linuxsteamrt64/" +GAMEBIN "/server/game/csgo/bin/" +GAMEBIN "/server/game/csgo_imported/bin/linuxsteamrt64/" +GAMEBIN "/server/game/csgo_imported/bin/" +GAMEBIN "/server/game/csgo_core/bin/linuxsteamrt64/" +GAMEBIN "/server/game/csgo_core/bin/" +GAMEBIN "/server/game/core/bin/linuxsteamrt64/" +GAMEBIN "/server/game/core/bin/" +GAMEROOT "/server/game/" +MOD "/server/game/csgo/pak01.vpk" (vpk) /server/game/csgo/pak01.vpk +MOD "/server/game/csgo_imported/pak01.vpk" (vpk) /server/game/csgo_imported/pak01.vpk +MOD "/server/game/csgo_core/pak01.vpk" (vpk) /server/game/csgo_core/pak01.vpk +MOD "/server/game/csgo/" +MOD "/server/game/csgo_imported/" +MOD "/server/game/csgo_core/" +PLATFORM "/server/game/core/pak01.vpk" (vpk) /server/game/core/pak01.vpk +PLATFORM "/server/game/core/" +SHADER_SOURCE "/server/src/shaders/csgo/" +SHADER_SOURCE "/server/src/shaders/csgo_imported/" +SHADER_SOURCE "/server/src/shaders/csgo_core/" +SHADER_SOURCE "/server/src/shaders/core/" +SHADER_SOURCE_MOD "/server/src/shaders/csgo/" +SHADER_SOURCE_ROOT "/server/src/shaders/" +command line arguments: +-dedicated +quit +Loaded /server/game/bin/linuxsteamrt64/libmeshsystem.so, got 0x559abae8d7a0 +Loaded /server/game/bin/linuxsteamrt64/libworldrenderer.so, got 0x559abae9f890 +Loaded /server/game/bin/linuxsteamrt64/libpulse_system.so, got 0x559abaeb21c0 +Loaded /server/game/bin/linuxsteamrt64/libvscript.so, got 0x559abaec6b90 +Loaded /server/game/bin/linuxsteamrt64/libnetworksystem.so, got 0x559abaed8c80 +Loaded /server/game/bin/linuxsteamrt64/libanimationsystem.so, got 0x559abaeece70 +Loaded /server/game/bin/linuxsteamrt64/libvphysics2.so, got 0x559abaf03160 +Loaded /server/game/bin/linuxsteamrt64/libsoundsystem.so, got 0x559abaf15eb0 +Loaded /server/game/bin/linuxsteamrt64/libscenesystem.so, got 0x559abaf2c1a0 +Loaded /server/game/bin/linuxsteamrt64/libv8system.so, got 0x559abaf41830 +Network System Initialized +Loaded /server/game/bin/linuxsteamrt64/libserver_valve.so, got (nil) + failed to dlopen /server/game/bin/linuxsteamrt64/libserver_valve.so error=/server/game/bin/linuxsteamrt64/libserver_valve.so: cannot open shared object file: No such file or directory + failed to dlopen "/server/game/bin/linuxsteamrt64/libserver_valve.so" error=/server/game/bin/linuxsteamrt64/libserver_valve.so: cannot open shared object file: No such file or directory +Loaded libserver_valve.so, got (nil) + failed to dlopen libserver_valve.so error=libserver_valve.so: cannot open shared object file: No such file or directory + failed to dlopen "libserver_valve.so" error=libserver_valve.so: cannot open shared object file: No such file or directory +Loaded /server/game/csgo/bin/linuxsteamrt64/libserver.so, got 0x559abaf5b630 +Physics Console Communications is not initialized +Loaded /server/game/bin/linuxsteamrt64/libengine2.so, got 0x559abad212b0 +Loaded /server/game/csgo/bin/linuxsteamrt64/libhost.so, got 0x559abaf8bde0 +Loaded /server/game/bin/linuxsteamrt64/libscenefilecache.so, got 0x559abaf9f370 +Loaded /server/game/bin/linuxsteamrt64/libparticles.so, got 0x559abafb1460 +Loaded /server/game/csgo/bin/linuxsteamrt64/libmatchmaking.so, got 0x559abafc4e10 +No .vcds loaded or no scenes/scenes.vrman +GameTypes: missing mapgroupsSP entry for game type/mode (custom/custom). +GameTypes: missing mapgroupsSP entry for game type/mode (cooperative/cooperative). +GameTypes: missing mapgroupsSP entry for game type/mode (cooperative/coopmission). +Event System loaded 93 events from file: vpk:/server/game/core/pak01.vpk:resource/core.gameevents. +Event System loaded 50 events from file: vpk:/server/game/csgo/pak01.vpk:resource/game.gameevents. +Event System loaded 152 events from file: vpk:/server/game/csgo/pak01.vpk:./resource/mod.gameevents. +CEntitySystem::BuildEntityNetworking (parallel build of server) took 16.460 msecs for 218 out of 297 classes +[STARTUP] {3.330} server module init ok +CHostStateMgr::QueueNewRequest( Idle (console), 1 ) +Source2Init OK +HostStateRequest::Start(HSR_IDLE): loop(console) id(1) addons() desc(Idle (console)) +SwitchToLoop console requested: id [1] addons [] +Host activate: Idle (console) +CHostStateMgr::QueueNewRequest( Quitting, 2 ) +HostStateRequest::Start(HSR_QUIT) +Host activate: Quitting +Dispatching EventAppShutdown_t { +Requested non-existent write path USRLOCAL! +Requested non-existent write path USRLOCAL! +Error writing user config file 'cfg/cs2_user_keys_0_slot0.vcfg' +Requested non-existent write path USRLOCAL! +Requested non-existent write path USRLOCAL! +Requested non-existent write path USRLOCAL! +Error writing user config file 'cfg/cs2_user_convars_0_slot0.vcfg' +} Dispatched EventAppShutdown_t +MainLoop returning +Source2Shutdown +ShutdownSource2Logging +CNetworkSystem::Shutdown() +CNetworkSystem::CloseAllSockets() +Forgot to remove resource type manager for type vpost! +Forgot to remove resource type manager for type vpcf! +Forgot to remove resource type manager for type vsnap! diff --git a/test/srcds-cs2-query b/test/srcds-cs2-query new file mode 100644 index 0000000000000000000000000000000000000000..15544b4e2c2b4cc3539b837ab00b4a46c42ce49f GIT binary patch literal 106 zcmezW|NnnaLFfF^ypq%+-Qbd<%|J(5+jD>;`Dq54Cz};Ob$#bISh=3 rdd8M|W_lJ38{0FPZMJ+hPH hlds-ricochet docker run --rm -it goldsourceservers/tfc 'hlds_linux -game tfc +version +exit' > hlds-tfc docker run --rm -it goldsourceservers/valve 'hlds_linux -game valve +version +exit' > hlds-valve +docker run --rm -it sourceservers/cs2 'game/bin/linuxsteamrt64/cs2 -dedicated +quit' > srcds-cs2 docker run --rm -it sourceservers/csgo 'srcds_linux -game csgo +version +exit' > srcds-csgo docker run --rm -it sourceservers/cstrike 'srcds_linux -game cstrike +version +exit' > srcds-cstrike docker run --rm -it sourceservers/dod 'srcds_linux -game dod +version +exit' > srcds-dod diff --git a/update/Dockerfile b/update/Dockerfile index 3d092bac..99c65e4a 100644 --- a/update/Dockerfile +++ b/update/Dockerfile @@ -40,21 +40,35 @@ RUN --mount=type=secret,id=STEAM_USERNAME \ i=$(( i+1 )); \ done; \ echo "[UPDATE] Performing cleanup"; \ - cd "$STEAMCMD_DIR" && rm -rf \ - linux64 \ - package \ - public \ - siteserverui \ - steam \ - linux32/libtier0_s.so \ - linux32/libvstdlib_s.so \ - linux32/steamclient.so \ - linux32/steamconsole.so \ - update_hosts_cached.vdf; \ - rm -rf /root/.steam; \ + # Clean up a different set of files for srcds/cs2 + if [ "$APPID" = 730 ]; then \ + cd "$STEAMCMD_DIR" && rm -rf \ + package \ + public \ + siteserverui \ + steam \ + linux32/libtier0_s.so \ + linux32/libvstdlib_s.so \ + linux32/steamconsole.so \ + update_hosts_cached.vdf; \ + else \ + cd "$STEAMCMD_DIR" && rm -rf \ + linux64 \ + package \ + public \ + siteserverui \ + steam \ + linux32/libtier0_s.so \ + linux32/libvstdlib_s.so \ + linux32/steamclient.so \ + linux32/steamconsole.so \ + update_hosts_cached.vdf; \ + rm -rf /root/.steam; \ + fi; \ if [ "$APPID" = 90 ]; then \ # Retain `/root/Steam/appcache` to prevent `steamcmd` from re-downloading `hlds` game entirely on game updates rm -rf $( find /root/Steam -mindepth 1 -maxdepth 1 | grep -v '^/root/Steam/appcache' ); \ else \ + # Cleanup. This also cleans up user data rm -rf /root/Steam; \ fi;