Compare commits
41 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 | |||
36be851863 | |||
1cb61cf7ec | |||
adc4ac4616 | |||
c96b1c14b8 |
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -1 +0,0 @@
|
||||
github: ich777
|
15
Dockerfile
15
Dockerfile
@@ -1,18 +1,22 @@
|
||||
FROM ich777/debian-baseimage:bullseye_amd64
|
||||
FROM ich777/debian-baseimage
|
||||
|
||||
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 lib32z1 lsof libicu67 && \
|
||||
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,11 +31,10 @@ 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/
|
||||
|
||||
#Server Start
|
||||
ENTRYPOINT ["/opt/scripts/start.sh"]
|
||||
ENTRYPOINT ["/opt/scripts/start.sh"]
|
48
README.md
48
README.md
@@ -1,48 +1,42 @@
|
||||
# SteamCMD in Docker optimized for Unraid
|
||||
This Docker will download and install SteamCMD. It will also install Counter-Strike 2 and run it.
|
||||
This Docker will download and install SteamCMD. It will also install ARK: Survival Evolved and run it.
|
||||
|
||||
**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!!!**
|
||||
**Update Notice:** Simply restart the container if a newer version of the game is available.
|
||||
|
||||
**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
|
||||
## Env params
|
||||
| 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: '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 |
|
||||
| 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 | blank |
|
||||
| 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 CS2 -d \
|
||||
-p 27015:27015 -p 27015:27015/udp \
|
||||
--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' \
|
||||
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/cs2:/serverdata/serverfiles \
|
||||
ich777/steamcmd:cs2
|
||||
--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!
|
||||
|
||||
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/
|
@@ -51,18 +51,22 @@ else
|
||||
fi
|
||||
|
||||
echo "---Prepare Server---"
|
||||
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
|
||||
#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---"
|
||||
cd ${SERVER_DIR}
|
||||
${SERVER_DIR}/game/bin/linuxsteamrt64/cs2 ${GAME_PARAMS}
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -38,4 +39,4 @@ while true
|
||||
do
|
||||
wait $killpid
|
||||
exit 0;
|
||||
done
|
||||
done
|
Reference in New Issue
Block a user