Compare commits
32 Commits
garrysmod
...
cstrikecze
Author | SHA1 | Date | |
---|---|---|---|
172bb1b6b7 | |||
485c303cf4 | |||
75cae8c31b
|
|||
b4932e9473
|
|||
e195f2ae97
|
|||
d713143011
|
|||
d917af2620
|
|||
cb9599fc32 | |||
11c3a27fb7 | |||
964a7b2f2f | |||
ccafe7cc6f | |||
93232acef9 | |||
428ae6f80d | |||
74a3f0c157 | |||
bdd3145be0 | |||
2cc0213860 | |||
06a2bbefbd | |||
5dedd0d3ca | |||
7c8173f48e | |||
bcd257d9e8 | |||
4c3c15e171 | |||
ee632b5aad | |||
84a240cf4d | |||
770f482c7d | |||
e9a09bc10e | |||
22c9b7acf3 | |||
1a14ffb168 | |||
6973c8f2a9 | |||
bd4b7af78d | |||
f0d15aa27a | |||
cda3e72503 | |||
bc6b4aa9b9 |
@@ -1,16 +1,17 @@
|
||||
FROM ich777/debian-baseimage
|
||||
FROM ich777/debian-baseimage:bullseye_amd64
|
||||
|
||||
LABEL org.opencontainers.image.authors="admin@minenet.at"
|
||||
LABEL org.opencontainers.image.source="https://github.com/ich777/docker-steamcmd-server"
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -y install --no-install-recommends lib32gcc-s1 lib32stdc++6 && \
|
||||
apt-get -y install --no-install-recommends lib32gcc-s1 libc6-i386 lib32stdc++6 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV DATA_DIR="/serverdata"
|
||||
ENV STEAMCMD_DIR="${DATA_DIR}/steamcmd"
|
||||
ENV SERVER_DIR="${DATA_DIR}/serverfiles"
|
||||
ENV GAME_ID="template"
|
||||
ENV GAME_MOD="template"
|
||||
ENV GAME_NAME="template"
|
||||
ENV GAME_PARAMS="template"
|
||||
ENV GAME_PORT=27015
|
||||
|
24
README.md
24
README.md
@@ -1,5 +1,5 @@
|
||||
# SteamCMD in Docker optimized for Unraid
|
||||
This Docker will download and install SteamCMD. It will also install Garry's Mod and run it.
|
||||
This Docker will download and install SteamCMD. It will also install Counter-Strike Condition Zero and run it.
|
||||
|
||||
**Update Notice:** Simply restart the container if a newer version of the game is available.
|
||||
|
||||
@@ -8,29 +8,31 @@ This Docker will download and install SteamCMD. It will also install Garry's Mod
|
||||
| --- | --- | --- |
|
||||
| STEAMCMD_DIR | Folder for SteamCMD | /serverdata/steamcmd |
|
||||
| SERVER_DIR | Folder for gamefile | /serverdata/serverfiles |
|
||||
| GAME_ID | The GAME_ID that the container downloads at startup. If you want to install a static or beta version of the game change the value to: '4020 -beta YOURBRANCH' (without quotes, replace YOURBRANCH with the branch or version you want to install). | 4020 |
|
||||
| GAME_NAME | SRCDS gamename | garrysmod |
|
||||
| GAME_PARAMS | Values to start the server | -secure +maxplayers 12 +map gm_flatgrass |
|
||||
| GAME_ID | The GAME_ID that the container downloads at startup. If you want to install a static or beta version of the game change the value to: '90 -beta YOURBRANCH' (without quotes, replace YOURBRANCH with the branch or version you want to install). | 90 +app_set_config '90 mod dmc' |
|
||||
| GAME_MOD | SteamID for server | 90 mod czero |
|
||||
| GAME_NAME | SRCDS gamename | czero |
|
||||
| GAME_PARAMS | Values to start the server | -secure +maxplayers 32 +map as_oilrig |
|
||||
| UID | User Identifier | 99 |
|
||||
| GID | Group Identifier | 100 |
|
||||
| GAME_PORT | Port the server will be running on | 27015 |
|
||||
| VALIDATE | Validates the game data | true |
|
||||
| VALIDATE | Validates the game data | blank |
|
||||
| USERNAME | Leave blank for anonymous login | blank |
|
||||
| PASSWRD | Leave blank for anonymous login | blank |
|
||||
|
||||
## Run example
|
||||
```
|
||||
docker run --name GarrysMod -d \
|
||||
docker run --name CStrikeConditionZero -d \
|
||||
-p 27015:27015 -p 27015:27015/udp \
|
||||
--env 'GAME_ID=4020' \
|
||||
--env 'GAME_NAME=garrysmod' \
|
||||
--env 'GAME_ID=90 +app_set_config '90 mod dmc'' \
|
||||
--env 'GAME_MOD=90 mod czero' \
|
||||
--env 'GAME_NAME=czero' \
|
||||
--env 'GAME_PORT=27015' \
|
||||
--env 'GAME_PARAMS=-secure +maxplayers 12 +map gm_flatgrass' \
|
||||
--env 'GAME_PARAMS=-secure +maxplayers 32 +map as_oilrig' \
|
||||
--env 'UID=99' \
|
||||
--env 'GID=100' \
|
||||
--volume /path/to/steamcmd:/serverdata/steamcmd \
|
||||
--volume /path/to/garrysmod:/serverdata/serverfiles \
|
||||
ich777/steamcmd:garrysmod
|
||||
--volume /path/to/cstrikeczero:/serverdata/serverfiles \
|
||||
ich777/steamcmd:cstrikeczero
|
||||
```
|
||||
|
||||
This Docker was mainly edited for better use with Unraid, if you don't use Unraid you should definitely try it!
|
||||
|
@@ -24,12 +24,14 @@ if [ "${USERNAME}" == "" ]; then
|
||||
${STEAMCMD_DIR}/steamcmd.sh \
|
||||
+force_install_dir ${SERVER_DIR} \
|
||||
+login anonymous \
|
||||
+app_set_config ${GAME_MOD} \
|
||||
+app_update ${GAME_ID} validate \
|
||||
+quit
|
||||
else
|
||||
${STEAMCMD_DIR}/steamcmd.sh \
|
||||
+force_install_dir ${SERVER_DIR} \
|
||||
+login anonymous \
|
||||
+app_set_config ${GAME_MOD} \
|
||||
+app_update ${GAME_ID} \
|
||||
+quit
|
||||
fi
|
||||
@@ -39,20 +41,47 @@ else
|
||||
${STEAMCMD_DIR}/steamcmd.sh \
|
||||
+force_install_dir ${SERVER_DIR} \
|
||||
+login ${USERNAME} ${PASSWRD} \
|
||||
+app_set_config ${GAME_MOD} \
|
||||
+app_update ${GAME_ID} validate \
|
||||
+quit
|
||||
else
|
||||
${STEAMCMD_DIR}/steamcmd.sh \
|
||||
+force_install_dir ${SERVER_DIR} \
|
||||
+login ${USERNAME} ${PASSWRD} \
|
||||
+app_set_config ${GAME_MOD} \
|
||||
+app_update ${GAME_ID} \
|
||||
+quit
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "---Checking if everything is installed correctly---"
|
||||
if [ ! -d ${SERVER_DIR}/czero ]; then
|
||||
echo "---Not everything is installed correctly, trying again---"
|
||||
if [ "${USERNAME}" == "" ]; then
|
||||
${STEAMCMD_DIR}/steamcmd.sh \
|
||||
+force_install_dir ${SERVER_DIR} \
|
||||
+login anonymous \
|
||||
+app_set_config ${GAME_MOD} \
|
||||
+app_update ${GAME_ID} validate \
|
||||
+quit
|
||||
else
|
||||
${STEAMCMD_DIR}/steamcmd.sh \
|
||||
+force_install_dir ${SERVER_DIR} \
|
||||
+login ${USERNAME} ${PASSWRD} \
|
||||
+app_set_config ${GAME_MOD} \
|
||||
+app_update ${GAME_ID} validate \
|
||||
+quit
|
||||
fi
|
||||
else
|
||||
echo "---Everything is installed correctly---"
|
||||
fi
|
||||
|
||||
echo "---Prepare Server---"
|
||||
mkdir ${DATA_DIR}/.steam/sdk32
|
||||
cp ${SERVER_DIR}/steamclient.so ${DATA_DIR}/.steam/sdk32/steamclient.so
|
||||
chmod -R ${DATA_PERM} ${DATA_DIR}
|
||||
echo "---Server ready---"
|
||||
|
||||
echo "---Start Server---"
|
||||
${SERVER_DIR}/srcds_run -game ${GAME_NAME} ${GAME_PARAMS} -console +port ${GAME_PORT}
|
||||
cd ${SERVER_DIR}
|
||||
${SERVER_DIR}/hlds_run -game ${GAME_NAME} ${GAME_PARAMS} -console +port ${GAME_PORT}
|
||||
|
Reference in New Issue
Block a user