Compare commits
37 Commits
Author | SHA1 | Date | |
---|---|---|---|
cadae6b892 | |||
493a6984fa | |||
e692243d58 | |||
83a802d20b
|
|||
cf58bd7e93
|
|||
df8e5e0030
|
|||
6608a56d58
|
|||
48eada8d55
|
|||
6ca6bb0058
|
|||
edecd65fdb
|
|||
a0a06a126f
|
|||
b1eef368a7
|
|||
05446c415f
|
|||
935a30c138
|
|||
6667a16244 | |||
71cf12869c | |||
3a3ea25c02 | |||
fd706d2bb7 | |||
38f9ef2043 | |||
5feb656ebe | |||
ea76dde62e | |||
e37f16ac71 | |||
bc902915cc | |||
c8c7cc0147 | |||
b06c4fcbf5 | |||
c0d7b012c2 | |||
c7373cc976 | |||
87ca88c47f | |||
ec3e1beccb | |||
46ae1befc8 | |||
5f93426cbd | |||
94554ab520 | |||
2e18b17538 | |||
8e5df88be4 | |||
cf42da30f4 | |||
5dcda0c5c4 | |||
6caaa9311e |
11
Dockerfile
11
Dockerfile
@@ -4,15 +4,19 @@ 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 && \
|
||||
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_NAME="template"
|
||||
ENV GAME_PARAMS="template"
|
||||
ENV GAME_PARAMS_EXTRA="template"
|
||||
ENV MAP="template"
|
||||
ENV SERVER_NAME="template"
|
||||
ENV SRV_PWD="template"
|
||||
ENV SRV_ADMIN_PWD="template"
|
||||
ENV GAME_PORT=27015
|
||||
ENV VALIDATE=""
|
||||
ENV UMASK=000
|
||||
@@ -27,8 +31,7 @@ RUN mkdir $DATA_DIR && \
|
||||
mkdir $STEAMCMD_DIR && \
|
||||
mkdir $SERVER_DIR && \
|
||||
useradd -d $DATA_DIR -s /bin/bash $USER && \
|
||||
chown -R $USER $DATA_DIR && \
|
||||
ulimit -n 2048
|
||||
chown -R $USER $DATA_DIR
|
||||
|
||||
ADD /scripts/ /opt/scripts/
|
||||
RUN chmod -R 770 /opt/scripts/
|
||||
|
28
README.md
28
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 ARK: Survival Evolved 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: '376030 -beta YOURBRANCH' (without quotes, replace YOURBRANCH with the branch or version you want to install). | 376030 |
|
||||
| MAP | Map name | TheIsland |
|
||||
| SERVER_NAME | Leave empty if you want to use the settings from GameUserSettings.ini (this variable accepts no spaces) | empty |
|
||||
| SRV_PWD | Leave empty if you want to use the settings from GameUserSettings.ini (this variable accepts no spaces) | empty |
|
||||
| SRV_ADMIN_PWD | Leave empty if you want to use the settings from GameUserSettings.ini (this variable accepts no spaces) | empty |
|
||||
| GAME_PARAMS | Enter your game parameters seperated with ? and start with a ? (don't put spaces in between eg: ?MaxPlayers=40?FastDecayUnsnappedCoreStructures=true) | empty |
|
||||
| GAME_PARAMS_EXTRA | Values to start the server | -server -log |
|
||||
| UID | User Identifier | 99 |
|
||||
| GID | Group Identifier | 100 |
|
||||
| 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 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' \
|
||||
docker run --name ARKSurvivalEvolved -d \
|
||||
-p 7777-7778:7777-7778/udp -p 27015:27015/udp -p 27020:27020 \
|
||||
--env 'GAME_ID=376030' \
|
||||
--env 'MAP=TheIsland' \
|
||||
--env 'GAME_PARAMS_EXTRA=-server -log' \
|
||||
--env 'UID=99' \
|
||||
--env 'GID=100' \
|
||||
--volume /path/to/steamcmd:/serverdata/steamcmd \
|
||||
--volume /path/to/garrysmod:/serverdata/serverfiles \
|
||||
ich777/steamcmd:garrysmod
|
||||
--volume /path/to/ark-se:/serverdata/serverfiles \
|
||||
ich777/steamcmd:arkse
|
||||
```
|
||||
|
||||
This Docker was mainly edited for better use with Unraid, if you don't use Unraid you should definitely try it!
|
||||
|
@@ -51,8 +51,22 @@ else
|
||||
fi
|
||||
|
||||
echo "---Prepare Server---"
|
||||
#if [ ! -f ${SERVER_DIR}/ShooterGame/Binaries/Linux/libsteam_api.so ]; then
|
||||
# echo "---Librarys not found, downloading---"
|
||||
# cd ${SERVER_DIR}/ShooterGame/Binaries/Linux
|
||||
# if wget -q -nc --show-progress --progress=bar:force:noscroll https://github.com/ich777/runtimes/raw/master/arkse/lib.tar.gz ; then
|
||||
# echo "---Download complete, extracting---"
|
||||
# tar -xvf ${SERVER_DIR}/ShooterGame/Binaries/Linux/lib.tar.gz
|
||||
# rm ${SERVER_DIR}/ShooterGame/Binaries/Linux/lib.tar.gz
|
||||
# else
|
||||
# echo "---Something went wrong, can't download Librarys, putting server in sleep mode---"
|
||||
# rm ${SERVER_DIR}/ShooterGame/Binaries/Linux/lib.tar.gz
|
||||
# sleep infinity
|
||||
# fi
|
||||
#fi
|
||||
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}/ShooterGame/Binaries/Linux
|
||||
./ShooterGameServer ${MAP}?listen?SessionName=${SERVER_NAME}?ServerPassword=${SRV_PWD}?ServerAdminPassword=${SRV_ADMIN_PWD}${GAME_PARAMS} ${GAME_PARAMS_EXTRA}
|
@@ -26,8 +26,9 @@ chown -R ${UID}:${GID} ${DATA_DIR}
|
||||
|
||||
echo "---Starting...---"
|
||||
term_handler() {
|
||||
kill -SIGTERM "$killpid"
|
||||
wait "$killpid" -f 2>/dev/null
|
||||
kill -SIGINT $(pidof ShooterGameServer)
|
||||
tail --pid=$(pidof ShooterGameServer) -f 2>/dev/null
|
||||
sleep 0.5
|
||||
exit 143;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user