Compare commits

..

21 Commits

Author SHA1 Message Date
e55b03ba94 „scripts/start.sh“ ändern 2022-10-25 11:04:45 +02:00
1a431c7286 „Dockerfile“ ändern 2022-05-06 10:30:28 +02:00
786c88ace3 „scripts/start.sh“ ändern 2022-04-18 11:40:23 +02:00
9c4d6dd1e5 „README.md“ ändern 2022-04-18 11:39:58 +02:00
f1eecac1ba „scripts/start.sh“ ändern 2022-04-07 17:18:32 +02:00
a624f05425 „scripts/start-server.sh“ ändern 2022-03-13 16:36:47 +01:00
27a57a48de „scripts/start.sh“ ändern 2022-03-13 16:36:22 +01:00
eb8aa41951 „Dockerfile“ ändern 2022-03-13 16:35:56 +01:00
64750fa660 „scripts/start.sh“ ändern 2020-04-28 17:03:46 +02:00
4defb796eb „.drone.yml“ löschen 2020-03-08 20:58:53 +01:00
361b3d7945 „.drone.yml“ hinzufügen
Some checks reported errors
continuous-integration/drone/push Build was killed
2020-03-05 20:27:15 +01:00
33e701b427 „scripts/start.sh“ hinzufügen 2020-02-25 14:44:30 +01:00
2f098b2c11 „scripts/start-server.sh“ ändern 2020-02-25 14:44:20 +01:00
f7d79aa6d0 „Dockerfile“ ändern 2020-02-25 14:24:59 +01:00
ece9c5258d „Dockerfile“ ändern 2020-01-19 20:57:39 +01:00
c8f27e028c „Dockerfile“ ändern 2020-01-19 20:53:33 +01:00
b6e788d2b6 „Dockerfile“ ändern 2020-01-19 20:48:27 +01:00
7eb6664c32 „Dockerfile“ ändern 2019-11-11 11:33:22 +01:00
1fa3f72937 „scripts/start-server.sh“ ändern 2019-11-11 11:21:20 +01:00
82ef8cb5aa „scripts/start-server.sh“ ändern 2019-06-02 18:31:17 +02:00
d79aa3a1ec „Dockerfile“ ändern 2019-06-02 18:30:36 +02:00
6 changed files with 19 additions and 53 deletions

View File

@@ -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

View File

@@ -1,5 +1,5 @@
# 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. It will also install Garry's Mod and run it.
**Update Notice:** Simply restart the container if a newer version of the game is available.
@@ -8,30 +8,33 @@ This Docker will download and install SteamCMD. It will also install Project Zom
| --- | --- | --- |
| 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: '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 |
| 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 GarrysMod -d \
-p 27015:27015 -p 27015:27015/udp \
--env 'GAME_ID=4020' \
--env 'GAME_NAME=garrysmod' \
--env 'GAME_PORT=27015' \
--env 'GAME_PARAMS=-secure +maxplayers 12 +map gm_flatgrass' \
--env 'UID=99' \
--env 'GID=100' \
--volume /path/to/steamcmd:/serverdata/steamcmd \
--volume /path/to/projectzomboid:/serverdata/serverfiles \
ich777/steamcmd:projectzomboid
--volume /path/to/garrysmod:/serverdata/serverfiles \
ich777/steamcmd:garrysmod
```
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/

Binary file not shown.

View File

@@ -51,35 +51,8 @@ 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!---"
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 "---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}

View File

@@ -1,8 +0,0 @@
#!/bin/bash
killpid="$(pidof ProjectZomboid64)"
while true
do
tail --pid=$killpid -f /dev/null
kill "$(pidof tail)"
exit 0
done

View File

@@ -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;
}