Compare commits
51 Commits
projectzom
...
deadside
Author | SHA1 | Date | |
---|---|---|---|
e77a8bcfe6 | |||
ca0c8fefe6
|
|||
e7c87bd8f1
|
|||
2432940e23
|
|||
89598a9710
|
|||
83992eb6cb
|
|||
5e4b466e76
|
|||
72a0e28c71
|
|||
82dea2c6af
|
|||
16d782c55e
|
|||
58f34acf41
|
|||
f0ea49bad6 | |||
d25c781c22 | |||
056f05756a | |||
1c79a312d2 | |||
41df27576a | |||
ad3762e4c0 | |||
821c430387 | |||
37e416a7b1 | |||
8d4d03b438 | |||
20a77cae00 | |||
2e9463a721 | |||
d62dca657f | |||
a7a8798ea8 | |||
94a9d103b6 | |||
25509af841 | |||
a82efe30be | |||
704525d91c | |||
252605ca63 | |||
eb266c39f6 | |||
57865f566b | |||
d22246d105 | |||
f0137cf7b6 | |||
0f592029f1 | |||
8d283cfe53 | |||
becf5dc1a7 | |||
4278fc8884 | |||
700351ff61 | |||
ed40f24e06 | |||
8b70b11884 | |||
d71ca52efe | |||
075799da02 | |||
1fea73c677 | |||
d8471aadf3 | |||
500275b668 | |||
f603c5a482 | |||
20e2a492b6 | |||
1af4324c74 | |||
83c8ce9cc4 | |||
5fe96b0b12 | |||
d755ec14fa |
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
github: ich777
|
@@ -4,7 +4,7 @@ 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 screen unzip && \
|
||||
apt-get -y install --no-install-recommends lib32gcc-s1 lib32stdc++6 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV DATA_DIR="/serverdata"
|
||||
@@ -13,7 +13,6 @@ ENV SERVER_DIR="${DATA_DIR}/serverfiles"
|
||||
ENV GAME_ID="template"
|
||||
ENV GAME_NAME="template"
|
||||
ENV GAME_PARAMS="template"
|
||||
ENV ADMIN_PWD="adminDocker"
|
||||
ENV GAME_PORT=27015
|
||||
ENV VALIDATE=""
|
||||
ENV UMASK=000
|
||||
@@ -27,7 +26,7 @@ ENV DATA_PERM=770
|
||||
RUN mkdir $DATA_DIR && \
|
||||
mkdir $STEAMCMD_DIR && \
|
||||
mkdir $SERVER_DIR && \
|
||||
useradd -d $SERVER_DIR -s /bin/bash $USER && \
|
||||
useradd -d $DATA_DIR -s /bin/bash $USER && \
|
||||
chown -R $USER $DATA_DIR && \
|
||||
ulimit -n 2048
|
||||
|
||||
|
31
README.md
31
README.md
@@ -1,37 +1,40 @@
|
||||
# SteamCMD in Docker optimized for Unraid
|
||||
This Docker will download and install SteamCMD. It will also install Project Zomboid and run it.
|
||||
This Docker will download and install SteamCMD and the according game that is pulled via specifying the Tag.
|
||||
|
||||
**Update Notice:** Simply restart the container if a newer version of the game is available.
|
||||
**Please see the different Tags/Branches which games are available.**
|
||||
|
||||
## Env params
|
||||
## Example Env params for CS:Source
|
||||
| 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: '380870 -beta YOURBRANCH' (without quotes, replace YOURBRANCH with the branch or version you want to install). | 380870 |
|
||||
| ADMIN_PWD | Password to become admin ingame | adminDocker |
|
||||
| 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: '232330 -beta YOURBRANCH' (without quotes, replace YOURBRANCH with the branch or version you want to install). | 232330 |
|
||||
| GAME_NAME | SRCDS gamename | cstrike |
|
||||
| GAME_PARAMS | Values to start the server | -secure +maxplayers 32 +map de_dust2 |
|
||||
| UID | User Identifier | 99 |
|
||||
| GID | Group Identifier | 100 |
|
||||
| VALIDATE | Validates the game data | false |
|
||||
| GAME_PORT | Port the server will be running on | 27015 |
|
||||
| VALIDATE | Validates the game data | true |
|
||||
| USERNAME | Leave blank for anonymous login | blank |
|
||||
| PASSWRD | Leave blank for anonymous login | blank |
|
||||
|
||||
## Run example
|
||||
```
|
||||
docker run --name ProjectZomboid -d \
|
||||
-p 16261-16262:16261-16262/udp -p 27015:27015 \
|
||||
--env 'GAME_ID=380870' \
|
||||
--env 'ADMIN_PWD=adminDocker' \
|
||||
docker run --name CSSource -d \
|
||||
-p 27015:27015 -p 27015:27015/udp \
|
||||
--env 'GAME_ID=232330' \
|
||||
--env 'GAME_NAME=cstrike' \
|
||||
--env 'GAME_PORT=27015' \
|
||||
--env 'GAME_PARAMS=-secure +maxplayers 32 +map de_dust2' \
|
||||
--env 'UID=99' \
|
||||
--env 'GID=100' \
|
||||
--volume /path/to/steamcmd:/serverdata/steamcmd \
|
||||
--volume /path/to/projectzomboid:/serverdata/serverfiles \
|
||||
ich777/steamcmd:projectzomboid
|
||||
--volume /path/to/cstrikesource:/serverdata/serverfiles \
|
||||
ich777/steamcmd:latest
|
||||
```
|
||||
|
||||
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/
|
BIN
config/cfg.zip
BIN
config/cfg.zip
Binary file not shown.
@@ -51,35 +51,18 @@ else
|
||||
fi
|
||||
|
||||
echo "---Prepare Server---"
|
||||
echo "---Setting up Environment---"
|
||||
export PATH="${SERVER_DIR}/jre64/bin:$PATH"
|
||||
export LD_LIBRARY_PATH="${SERVER_DIR}/linux64:${SERVER_DIR}/natives:${SERVER_DIR}:${SERVER_DIR}/jre64/lib/amd64:${LD_LIBRARY_PATH}"
|
||||
export JSIG="libjsig.so"
|
||||
export JARPATH="java/:java/lwjgl.jar:java/lwjgl_util.jar:java/sqlite-jdbc-3.8.10.1.jar:java/uncommons-maths-1.2.3.jar"
|
||||
echo "---Looking for server configuration file---"
|
||||
if [ ! -d ${SERVER_DIR}/Zomboid ]; then
|
||||
echo "---No server configruation found, downloading template---"
|
||||
cd ${SERVER_DIR}
|
||||
if wget -q -nc --show-progress --progress=bar:force:noscroll https://github.com/ich777/docker-steamcmd-server/raw/projectzomboid/config/cfg.zip ; then
|
||||
echo "---Sucessfully downloaded server configuration file---"
|
||||
else
|
||||
echo "---Something went wrong, can't download server configuration file, putting server in sleep mode---"
|
||||
sleep infinity
|
||||
fi
|
||||
unzip -o ${SERVER_DIR}/cfg.zip
|
||||
rm ${SERVER_DIR}/cfg.zip
|
||||
else
|
||||
echo "---Server configuration files found!---"
|
||||
if [ ! -f ${DATA_DIR}/.steam/sdk32/steamclient.so ]; then
|
||||
if [ ! -d ${DATA_DIR}/.steam/sdk32 ]; then
|
||||
mkdir -p ${DATA_DIR}/.steam/sdk32
|
||||
fi
|
||||
cp -R ${STEAMCMD_DIR}/linux32/* ${DATA_DIR}/.steam/sdk32/
|
||||
fi
|
||||
|
||||
echo "---Checking for old logs---"
|
||||
find ${SERVER_DIR} -name "masterLog.0" -exec rm -f {} \; > /dev/null 2>&1
|
||||
chmod -R ${DATA_PERM} ${DATA_DIR}
|
||||
echo "---Server ready---"
|
||||
|
||||
echo "---Sleep zZzZz---"
|
||||
sleep infinity
|
||||
|
||||
echo "---Start Server---"
|
||||
cd ${SERVER_DIR}
|
||||
screen -S PZ -L -Logfile ${SERVER_DIR}/masterLog.0 -d -m ${SERVER_DIR}/ProjectZomboid64 -adminpassword ${ADMIN_PWD} ${GAME_PARAMS}
|
||||
sleep 2
|
||||
screen -S watchdog -d -m /opt/scripts/start-watchdog.sh
|
||||
tail -f ${SERVER_DIR}/masterLog.0
|
||||
${SERVER_DIR}/srcds_run -game ${GAME_NAME} ${GAME_PARAMS} -console +port ${GAME_PORT}
|
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
killpid="$(pidof ProjectZomboid64)"
|
||||
while true
|
||||
do
|
||||
tail --pid=$killpid -f /dev/null
|
||||
kill "$(pidof tail)"
|
||||
exit 0
|
||||
done
|
@@ -26,9 +26,8 @@ chown -R ${UID}:${GID} ${DATA_DIR}
|
||||
|
||||
echo "---Starting...---"
|
||||
term_handler() {
|
||||
kill -SIGINT $(pidof ProjectZomboid64)
|
||||
tail --pid=$(pidof ProjectZomboid64) -f 2>/dev/null
|
||||
sleep 0.5
|
||||
kill -SIGTERM "$killpid"
|
||||
wait "$killpid" -f 2>/dev/null
|
||||
exit 143;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user