File tree Expand file tree Collapse file tree 11 files changed +25
-17
lines changed Expand file tree Collapse file tree 11 files changed +25
-17
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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 }}
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change 44
55# BUILD STAGE
66
7- FROM cm2network/steamcmd:root-bookworm as build_stage
7+ FROM registry.gitlab.steamos.cloud/steamrt/sniper/platform as build_stage
88
99LABEL maintainer=
"[email protected] " 1010
11+ # TODO - Separate stage
12+ ARG PUID=1000
13+ ENV USER steam
14+ ENV HOMEDIR "/home/${USER}"
15+ ENV STEAMCMDDIR "${HOMEDIR}/steamcmd"
16+
1117ENV STEAMAPPID 730
1218ENV STEAMAPP cs2
1319ENV STEAMAPPDIR "${HOMEDIR}/${STEAMAPP}-dedicated"
@@ -29,17 +35,22 @@ RUN set -x \
2935 libicu-dev \
3036 unzip \
3137 jq \
38+ && useradd -u "${PUID}" -m "${USER}" \
3239 && mkdir -p "${STEAMAPPDIR}" \
40+ && mkdir -p "${STEAMCMDDIR}" \
3341 # Add entry script
3442 && chmod +x "${HOMEDIR}/entry.sh" \
35- && chown -R "${USER}:${USER}" "${HOMEDIR}/entry.sh" "${STEAMAPPDIR} " \
43+ && chown -R "${USER}:${USER}" "${HOMEDIR}" \
3644 # Clean up
3745 && apt-get clean \
38- && find /var/lib/apt/lists/ -type f -delete
46+ && find /var/lib/apt/lists/ -type f -delete \
47+ && su "${USER}" -c \
48+ "curl -fsSL 'https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz' | tar xvzf - -C \" ${STEAMCMDDIR}\" \
49+ && \" ./${STEAMCMDDIR}/steamcmd.sh\" +quit " \
3950
4051# BASE
4152
42- FROM build_stage AS bookworm -base
53+ FROM build_stage AS sniper -base
4354
4455ENV CS2_SERVERNAME="cs2 private server" \
4556 CS2_CHEATS=0 \
Original file line number Diff line number Diff line change 5555mkdir -p ~ /.steam/sdk64
5656ln -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
6259mkdir -p $STEAMAPPDIR /game/csgo/cfg
6360cp /etc/server.cfg " ${STEAMAPPDIR} " /game/csgo/cfg/server.cfg
@@ -132,7 +129,7 @@ if [[ ! -z $CS2_BOT_QUOTA_MODE ]] ; then
132129fi
133130
134131# Switch to server directory
135- cd " ${STEAMAPPDIR} /game/bin/linuxsteamrt64 "
132+ cd " ${STEAMAPPDIR} /game/"
136133
137134# Pre Hook
138135source " ${STEAMAPPDIR} /pre.sh"
@@ -185,7 +182,7 @@ if [[ ! -z $CS2_RCON_PORT ]]; then
185182fi
186183
187184echo " 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.
Original file line number Diff line number Diff line change 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} /..
You can’t perform that action at this time.
0 commit comments