-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5882c77
commit e8ba7a7
Showing
2 changed files
with
67 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Build HLDS Image", | ||
"type": "docker-build", | ||
"dockerBuild": { | ||
"context": "${workspaceFolder}", | ||
"buildArgs": { | ||
"MOD": "${input:mod}" | ||
}, | ||
"tag": "rehlds_image:${input:mod}" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "Run HLDS container", | ||
"command": "docker run --rm -ti -p 26900-27020:26900-27020/udp rehlds_image:${input:mod}", | ||
"dependsOn": [ | ||
"Build HLDS Image" | ||
] | ||
} | ||
], | ||
"inputs": [ | ||
{ | ||
"type": "pickString", | ||
"id": "mod", | ||
"default": "valve", | ||
"description": "Select mod.", | ||
"options": [ | ||
"valve", | ||
"cstrike", | ||
"czero", | ||
"dod", | ||
"gearbox", | ||
"tfc", | ||
"ricochet", | ||
"dmc" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,36 @@ | ||
ARG APPDIR="/root/hlds" | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM debian:bookworm-slim AS build_stage | ||
ARG APPDIR | ||
ARG MOD="valve" | ||
ARG TAG="steam_legacy" | ||
|
||
FROM debian:trixie-slim AS build_stage | ||
|
||
LABEL creator="Sergey Shorokhov <[email protected]>" | ||
|
||
# Install required packages | ||
RUN set -x \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends --no-install-suggests \ | ||
ca-certificates curl libarchive-tools \ | ||
ca-certificates=20240203 \ | ||
curl=8.5.0-2 \ | ||
libarchive-tools=3.7.2-1 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /root/ | ||
COPY --chmod=755 utils/* utils/ | ||
WORKDIR /usr/local/bin/ | ||
|
||
ADD --chmod=755 https://raw.githubusercontent.com/hldsdocker/rehlds/master/utils/GetGithubReleaseUrl.sh GetGithubReleaseUrl | ||
|
||
WORKDIR /root/hlds | ||
|
||
# Install ReHLDS | ||
RUN releaseLink=$(utils/GetGithubReleaseUrl.sh "dreamstalker/rehlds" "latest") \ | ||
&& mkdir -p $APPDIR \ | ||
&& curl -L# $releaseLink | bsdtar -xf - --strip-components=2 --directory $APPDIR bin/linux32/* \ | ||
&& chmod +x $APPDIR/hlds_linux $APPDIR/hltv \ | ||
&& rm -rf utils | ||
RUN releaseLink=$(GetGithubReleaseUrl "dreamstalker/rehlds" "latest") \ | ||
&& curl -sSL $releaseLink | bsdtar -xf - --strip-components=2 bin/linux32/* \ | ||
&& chmod +x hlds_linux hltv | ||
|
||
# Install ReGameDLL_CS | ||
RUN releaseLink=$(GetGithubReleaseUrl "s1lentq/ReGameDLL_CS" "latest") \ | ||
&& curl -sSL $releaseLink | bsdtar -xf - --strip-components=2 bin/linux32/* | ||
|
||
FROM wopox1337/hlds:steam_legacy AS run_stage | ||
ARG APPDIR | ||
FROM hldsdocker/${MOD}:${TAG} AS run_stage | ||
|
||
COPY --chmod=755 --from=build_stage ${APPDIR} ${APPDIR} | ||
COPY --chown=${APPUSER}:${APPUSER} --chmod=755 --from=build_stage /root/hlds . |