Skip to content

Commit bd631c0

Browse files
authored
Merge pull request #185 from joedwards32/176-unable-to-load-libv8so-after-update-of-september-17th
176 unable to load libv8so after update of september 17th
2 parents 8737a6f + 21e5b7e commit bd631c0

File tree

11 files changed

+38
-30
lines changed

11 files changed

+38
-30
lines changed

.github/workflows/docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v3
1717
- name: Build the Docker image
18-
working-directory: ./bookworm
18+
working-directory: ./sniper
1919
run: docker build . --file Dockerfile --tag joedwards32/cs2:latest

.github/workflows/docker-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ jobs:
7373
- name: Build and push Docker image
7474
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
7575
with:
76-
context: ./bookworm
77-
file: ./bookworm/Dockerfile
76+
context: ./sniper
77+
file: ./sniper/Dockerfile
7878
push: ${{ github.event_name != 'pull_request' }}
7979
tags: ${{ steps.meta.outputs.tags }}
8080
labels: ${{ steps.meta.outputs.labels }}

bookworm/hooks/build

Lines changed: 0 additions & 5 deletions
This file was deleted.
File renamed without changes.

bookworm/Dockerfile renamed to sniper/Dockerfile

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@
22
# Dockerfile that builds a CS2 Gameserver
33
###########################################################
44

5-
# BUILD STAGE
5+
# SteamCMD Stage
66

7-
FROM cm2network/steamcmd:root-bookworm as build_stage
7+
FROM registry.gitlab.steamos.cloud/steamrt/sniper/platform as steamcmd
88

99
LABEL maintainer="joedwards32@gmail.com"
1010

11-
ENV STEAMAPPID 730
12-
ENV STEAMAPP cs2
13-
ENV STEAMAPPDIR "${HOMEDIR}/${STEAMAPP}-dedicated"
14-
ENV STEAMAPPVALIDATE 0
15-
16-
COPY etc/entry.sh "${HOMEDIR}/entry.sh"
17-
COPY etc/server.cfg "/etc/server.cfg"
18-
COPY etc/pre.sh "/etc/pre.sh"
19-
COPY etc/post.sh "/etc/post.sh"
11+
# TODO - Separate stage
12+
ARG PUID=1000
13+
ENV USER steam
14+
ENV HOMEDIR "/home/${USER}"
15+
ENV STEAMCMDDIR "${HOMEDIR}/steamcmd"
2016

2117
RUN set -x \
2218
# Install, update & upgrade packages
@@ -29,17 +25,30 @@ RUN set -x \
2925
libicu-dev \
3026
unzip \
3127
jq \
32-
&& mkdir -p "${STEAMAPPDIR}" \
28+
&& useradd -u "${PUID}" -m "${USER}" \
29+
&& mkdir -p "${STEAMCMDDIR}" \
3330
# Add entry script
34-
&& chmod +x "${HOMEDIR}/entry.sh" \
35-
&& chown -R "${USER}:${USER}" "${HOMEDIR}/entry.sh" "${STEAMAPPDIR}" \
31+
&& chown -R "${USER}:${USER}" "${HOMEDIR}" \
3632
# Clean up
3733
&& apt-get clean \
38-
&& find /var/lib/apt/lists/ -type f -delete
34+
&& find /var/lib/apt/lists/ -type f -delete \
35+
&& su "${USER}" -c \
36+
"curl -fsSL 'https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz' | tar xvzf - -C \"${STEAMCMDDIR}\" \
37+
&& \"./${STEAMCMDDIR}/steamcmd.sh\" +quit "
3938

40-
# BASE
39+
# CS2
4140

42-
FROM build_stage AS bookworm-base
41+
FROM steamcmd AS cs2
42+
43+
ENV STEAMAPPID 730
44+
ENV STEAMAPP cs2
45+
ENV STEAMAPPDIR "${HOMEDIR}/${STEAMAPP}-dedicated"
46+
ENV STEAMAPPVALIDATE 0
47+
48+
COPY etc/entry.sh "${HOMEDIR}/entry.sh"
49+
COPY etc/server.cfg "/etc/server.cfg"
50+
COPY etc/pre.sh "/etc/pre.sh"
51+
COPY etc/post.sh "/etc/post.sh"
4352

4453
ENV CS2_SERVERNAME="cs2 private server" \
4554
CS2_CHEATS=0 \
@@ -73,6 +82,8 @@ ENV CS2_SERVERNAME="cs2 private server" \
7382
# Set permissions on STEAMAPPDIR
7483
# Permissions may need to be reset if persistent volume mounted
7584
RUN set -x \
85+
&& mkdir -p "${STEAMAPPDIR}" \
86+
&& chmod +x "${HOMEDIR}/entry.sh" \
7687
&& chown -R "${USER}:${USER}" "${STEAMAPPDIR}" \
7788
&& chmod 0777 "${STEAMAPPDIR}"
7889

bookworm/etc/entry.sh renamed to sniper/etc/entry.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ fi
5555
mkdir -p ~/.steam/sdk64
5656
ln -sfT ${STEAMCMDDIR}/linux64/steamclient.so ~/.steam/sdk64/steamclient.so
5757

58-
# FIX: extend linked library search path to include additional libs provided by valve
59-
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${STEAMAPPDIR}/bin/linuxsteamrt64"
60-
6158
# Install server.cfg
6259
mkdir -p $STEAMAPPDIR/game/csgo/cfg
6360
cp /etc/server.cfg "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg
@@ -132,7 +129,7 @@ if [[ ! -z $CS2_BOT_QUOTA_MODE ]] ; then
132129
fi
133130

134131
# Switch to server directory
135-
cd "${STEAMAPPDIR}/game/bin/linuxsteamrt64"
132+
cd "${STEAMAPPDIR}/game/"
136133

137134
# Pre Hook
138135
source "${STEAMAPPDIR}/pre.sh"
@@ -185,7 +182,7 @@ if [[ ! -z $CS2_RCON_PORT ]]; then
185182
fi
186183

187184
echo "Starting CS2 Dedicated Server"
188-
eval "./cs2" -dedicated \
185+
eval "./cs2.sh" -dedicated \
189186
"${CS2_IP_ARGS}" -port "${CS2_PORT}" \
190187
-console \
191188
-usercon \
File renamed without changes.
File renamed without changes.
File renamed without changes.

sniper/hooks/build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
4+
5+
docker build --target=sniper-base -t $DOCKER_REPO:latest -t $DOCKER_REPO:base ${SCRIPT_DIR}/..

0 commit comments

Comments
 (0)