Compare commits

..

71 Commits

Author SHA1 Message Date
32a913ac99 Dockerfile aktualisiert 2024-03-08 08:21:44 +01:00
f405cc75e4 README.md aktualisiert 2023-09-30 10:04:03 +02:00
84570af70c README.md aktualisiert 2023-09-30 10:02:50 +02:00
bfd2c56b29 README.md aktualisiert 2023-09-30 10:02:29 +02:00
23efba0676 Dockerfile aktualisiert 2023-09-30 09:50:40 +02:00
71df246b0d scripts/start-server.sh aktualisiert 2023-09-30 09:49:10 +02:00
aa5d5d8f4c scripts/start-server.sh aktualisiert 2023-09-30 08:50:39 +02:00
713a899b2c Update scripts/start-server.sh 2023-07-13 08:29:20 +02:00
05f20eac1e Update scripts/start-server.sh 2023-07-13 08:09:00 +02:00
dcd70dd299 Update Dockerfile 2023-06-14 13:28:06 +02:00
a295ac337d „scripts/start.sh“ ändern 2022-10-25 10:59:28 +02:00
e712070a37 „Dockerfile“ ändern 2022-09-08 08:36:13 +02:00
fc31e10b7c „Dockerfile“ ändern 2022-05-06 09:05:58 +02:00
1cb7ab5f8b „README.md“ ändern 2022-04-18 13:07:46 +02:00
82b45708e5 Merge pull request #19 from Ornias1993/patch-1
ensure group is linked correctly
2022-04-07 16:58:05 +02:00
Kjeld Schouten-Lebbing
27f2c6ee47 Update start.sh 2022-04-07 14:36:32 +02:00
Kjeld Schouten-Lebbing
0fb3b33466 Update scripts/start.sh 2022-04-07 13:45:57 +02:00
Kjeld Schouten-Lebbing
2bcce9f74e Apply suggestions from code review
Co-authored-by: Christoph <christophhummer@gmail.com>
2022-04-07 13:17:32 +02:00
Kjeld Schouten-Lebbing
4f2d323874 shrink code and add clearer logging 2022-04-07 12:31:54 +02:00
Kjeld Schouten-Lebbing
638550d65d Update start.sh 2022-04-07 12:26:18 +02:00
Kjeld Schouten-Lebbing
58135e9a43 Update scripts/start.sh 2022-04-07 00:44:32 +02:00
Kjeld Schouten-Lebbing
5bc5d45ffb Update Dockerfile 2022-04-07 00:43:57 +02:00
Kjeld Schouten-Lebbing
8a1b43d82d Update Dockerfile 2022-04-07 00:43:50 +02:00
Kjeld Schouten-Lebbing
d8faf8d04e Support read-only user-scripts 2022-04-06 21:04:50 +02:00
Kjeld Schouten-Lebbing
6cb4fd6f96 Ensure the GID is actually dynamically assigned to a group as well. 2022-04-06 09:48:52 +02:00
Kjeld Schouten-Lebbing
25688e6709 ensure group is created in Dockerfile
This ensures a group is created inside the container before the entrypoint is triggered, as some container engines might trigger a "group not found" error assigning the GID to said group
2022-04-06 09:44:46 +02:00
5e4b466e76 „scripts/start-server.sh“ ändern 2021-12-14 12:50:25 +01:00
72a0e28c71 „README.md“ ändern 2021-12-14 09:02:35 +01:00
82dea2c6af „README.md“ ändern 2021-12-13 11:30:40 +01:00
16d782c55e „Dockerfile“ ändern 2021-09-30 12:23:45 +02:00
58f34acf41 „.github/FUNDING.yml“ hinzufügen 2021-08-27 23:31:33 +02:00
f0ea49bad6 „scripts/start.sh“ ändern 2021-04-14 08:27:32 +02:00
d25c781c22 „Dockerfile“ ändern 2021-04-14 08:12:56 +02:00
056f05756a „scripts/start.sh“ ändern 2021-04-14 08:08:20 +02:00
1c79a312d2 „Dockerfile“ ändern 2021-04-14 08:07:50 +02:00
41df27576a „Dockerfile“ ändern 2021-02-21 08:17:57 +01:00
ad3762e4c0 „Dockerfile“ ändern 2021-02-21 08:17:27 +01:00
821c430387 „Dockerfile“ ändern 2021-02-21 07:59:59 +01:00
37e416a7b1 „scripts/start.sh“ ändern 2020-04-11 14:06:08 +02:00
8d4d03b438 „.drone.yml“ löschen 2020-03-08 20:30:31 +01:00
20a77cae00 „.drone.yml“ hinzufügen
Some checks reported errors
continuous-integration/drone/push Build was killed
2020-03-05 18:56:44 +01:00
2e9463a721 „scripts/start.sh“ ändern 2020-02-25 12:48:41 +01:00
d62dca657f „scripts/start.sh“ ändern 2020-02-25 12:48:13 +01:00
a7a8798ea8 „scripts/start-server.sh“ ändern 2020-02-25 12:19:05 +01:00
94a9d103b6 „scripts/start.sh“ hinzufügen 2020-02-25 12:18:45 +01:00
25509af841 „Dockerfile“ ändern 2020-02-25 12:18:21 +01:00
a82efe30be „Dockerfile“ ändern 2019-12-28 12:31:28 +01:00
704525d91c „Dockerfile“ ändern 2019-12-26 09:56:23 +01:00
252605ca63 „Dockerfile“ ändern 2019-12-26 09:37:14 +01:00
eb266c39f6 code cleanup 2019-12-26 09:30:26 +01:00
57865f566b „Dockerfile“ ändern 2019-12-26 09:28:55 +01:00
d22246d105 „Dockerfile“ ändern 2019-12-26 09:27:28 +01:00
f0137cf7b6 „Dockerfile“ ändern 2019-12-26 09:06:31 +01:00
0f592029f1 „Dockerfile“ ändern 2019-12-26 09:06:06 +01:00
8d283cfe53 switched to debian:buster-slim 2019-12-26 08:48:19 +01:00
becf5dc1a7 „scripts/start-server.sh“ ändern 2019-12-26 08:35:26 +01:00
4278fc8884 „scripts/start-server.sh“ ändern 2019-12-26 08:21:34 +01:00
700351ff61 „scripts/start-server.sh“ ändern 2019-11-11 10:59:02 +01:00
ed40f24e06 „scripts/start-server.sh“ ändern 2019-11-11 10:58:42 +01:00
8b70b11884 „Dockerfile“ ändern 2019-11-11 10:58:25 +01:00
d71ca52efe „README.md“ ändern 2019-05-29 12:37:47 +02:00
075799da02 „README.md“ ändern 2019-05-29 12:37:14 +02:00
1fea73c677 „scripts/start-server.sh“ ändern 2019-05-20 21:34:55 +02:00
d8471aadf3 „scripts/start-server.sh“ ändern 2019-05-20 17:03:45 +02:00
500275b668 „Dockerfile“ ändern 2019-05-20 16:44:28 +02:00
f603c5a482 Update start-server.sh 2019-05-07 21:50:15 +02:00
20e2a492b6 Update Dockerfile 2019-05-07 21:49:40 +02:00
1af4324c74 Update start-server.sh 2019-04-29 17:30:58 +02:00
83c8ce9cc4 Update start-server.sh 2019-04-24 12:59:19 +02:00
5fe96b0b12 Update start-server.sh 2019-04-24 12:13:20 +02:00
d755ec14fa Merge pull request #3 from ich777/beta
Updated to support login
2019-04-23 18:10:56 +02:00
5 changed files with 38 additions and 51 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
github: ich777

View File

@@ -4,14 +4,13 @@ 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 libc6-i386 lib32stdc++6 && \
apt-get -y install --no-install-recommends lib32gcc-s1 lib32stdc++6 lib32z1 lsof libicu67 && \
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
@@ -35,4 +34,4 @@ ADD /scripts/ /opt/scripts/
RUN chmod -R 770 /opt/scripts/
#Server Start
ENTRYPOINT ["/opt/scripts/start.sh"]
ENTRYPOINT ["/opt/scripts/start.sh"]

View File

@@ -1,42 +1,48 @@
# SteamCMD in Docker optimized for Unraid
This Docker will download and install SteamCMD. It will also install Counter-Strike Condition Zero and run it.
This Docker will download and install SteamCMD. It will also install Counter-Strike 2 and run it.
**Update Notice:** Simply restart the container if a newer version of the game is available.
**ATTENTION:** You have to provide a valid Steam account with the game in it is Library and SteamGuard completely disabled so that the download is working!
_It is recommended that you create dedicated Steam account for your dedicated servers with the games in it and SteamGuard completely disabled!_
**DON'T DISABLE STEAM GUARD ON YOUR PRIMARY ACCOUNT!!!**
## Env params
**ATTENTION:** First Startup can take very long since it downloads the gameserver files!
**PUBLIC PLAY:** If you want that your server is public listed you must add '+sv_setsteamaccount YOURTOKEN' to the GAME_PARAMS (without the quotes and replace YOURTOKEN with your token).
Create your token here: https://steamcommunity.com/dev/managegameservers (every gameserver needs it's own token!!!)
You can also run multiple servers with only one SteamCMD directory!
## Example Env
| Name | Value | Example |
| --- | --- | --- |
| 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: '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 |
| 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: '730 -beta YOURBRANCH' (without quotes, replace YOURBRANCH with the branch or version you want to install). | 730 |
| USERNAME | Leave blank for anonymous login | \<STEAMUSER> |
| PASSWRD | Leave blank for anonymous login | \<STEAMPASSWORD> |
| GAME_PARAMS | Values to start the server | -dedicated -dev +map de_inferno +game_type 0 +game_mode 1 -usercon |
| UID | User Identifier | 99 |
| GID | Group Identifier | 100 |
| GAME_PORT | Port the server will be running on | 27015 |
| 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 CStrikeConditionZero -d \
docker run --name CS2 -d \
-p 27015:27015 -p 27015:27015/udp \
--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 32 +map as_oilrig' \
--env 'GAME_ID=730' \
--env 'USERNAME=<STEAMUSER>' \
--env 'PASSWRD=<STEAMPASSWORD>' \
--env 'GAME_PARAMS=-dedicated -dev +map de_inferno +game_type 0 +game_mode 1 -usercon' \
--env 'UID=99' \
--env 'GID=100' \
--volume /path/to/steamcmd:/serverdata/steamcmd \
--volume /path/to/cstrikeczero:/serverdata/serverfiles \
ich777/steamcmd:cstrikeczero
--volume /path/to/cs2:/serverdata/serverfiles \
ich777/steamcmd:cs2
```
This Docker was mainly edited for better use with Unraid, if you don't use Unraid you should definitely try it!
This Docker is forked from mattieserver, thank you for this wonderfull Docker.
### Support Thread: https://forums.unraid.net/topic/79530-support-ich777-gameserver-dockers/
#### Support Thread: https://forums.unraid.net/topic/79530-support-ich777-gameserver-dockers/

View File

@@ -24,14 +24,12 @@ 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
@@ -41,47 +39,30 @@ 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
if [ ! -f ${DATA_DIR}/.steam/sdk64/steamclient.so ]; then
if [ ! -d ${DATA_DIR}/.steam ]; then
mkdir ${DATA_DIR}/.steam
fi
if [ ! -d ${DATA_DIR}/.steam/sdk64 ]; then
mkdir ${DATA_DIR}/.steam/sdk64
fi
cp -R ${STEAMCMD_DIR}/linux64/* ${DATA_DIR}/.steam/sdk64/
fi
chmod -R ${DATA_PERM} ${DATA_DIR}
echo "---Server ready---"
echo "---Start Server---"
cd ${SERVER_DIR}
${SERVER_DIR}/hlds_run -game ${GAME_NAME} ${GAME_PARAMS} -console +port ${GAME_PORT}
${SERVER_DIR}/game/bin/linuxsteamrt64/cs2 ${GAME_PARAMS}

View File

@@ -38,4 +38,4 @@ while true
do
wait $killpid
exit 0;
done
done