Compare commits
39 Commits
Author | SHA1 | Date | |
---|---|---|---|
a9f860a90f | |||
ed1f69d416
|
|||
260d8e8231
|
|||
fc0c13b7ba
|
|||
cfa1595845
|
|||
c1001b4e0d
|
|||
6932a1111b
|
|||
5a32ecdcf5
|
|||
aee125ef84
|
|||
e1756e4f8c | |||
6823053436 | |||
7e0c205cf2 | |||
094c16312a | |||
6c536b5800 | |||
b801907811 | |||
01a24bef73 | |||
45aa61f7d0 | |||
bb66516411 | |||
72e1b5250a | |||
749b6656bd | |||
f2ee297a8d | |||
aa619a5d25 | |||
f954ebe1ae | |||
ba1a9ad18e | |||
4662adbea8 | |||
f86be5a42c | |||
d330606d77 | |||
26e6f09e1f | |||
728a3464ac | |||
7d0b2023cc | |||
a9333a0352 | |||
f3b120f82d | |||
b380bc7f24 | |||
c463e82651 | |||
1c1fbc6826 | |||
36be851863 | |||
1cb61cf7ec | |||
adc4ac4616 | |||
c96b1c14b8 |
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -1 +0,0 @@
|
||||
github: ich777
|
@@ -1,10 +1,10 @@
|
||||
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 unzip && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV DATA_DIR="/serverdata"
|
||||
@@ -15,6 +15,9 @@ ENV GAME_NAME="template"
|
||||
ENV GAME_PARAMS="template"
|
||||
ENV GAME_PORT=27015
|
||||
ENV VALIDATE=""
|
||||
ENV ROCKET_MOD="true"
|
||||
ENV ROCKET_URL="https://ci.rocketmod.net/job/Rocket.Unturned/lastSuccessfulBuild/artifact/Rocket.Unturned/bin/Release/Rocket.zip"
|
||||
ENV ROCKET_FORCE_UPDATE=""
|
||||
ENV UMASK=000
|
||||
ENV UID=99
|
||||
ENV GID=100
|
||||
@@ -34,4 +37,4 @@ 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 Unturned 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: '1110390 -beta YOURBRANCH' (without quotes, replace YOURBRANCH with the branch or version you want to install). | 1110390 |
|
||||
| GAME_PARAMS | Values to start the server | -pei -normal -nosync -pve |
|
||||
| ROCKET_MOD | Set to 'true' (without quotes) to install Rocket Mod otherwise leave blank | empty |
|
||||
| ROCKET_FORCE_UPDATE | If you want to force a update of Rocket Mod set to 'true' (without quotes) ATTENTION: All files in the 'Modules' & 'Scripts' folder will be overwritten backup the files bevor doing that! | empty |
|
||||
| GAME_PORT | Port the server will be running on | 27015 |
|
||||
| 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 | empty |
|
||||
| PASSWRD | Leave blank for anonymous login | empty |
|
||||
|
||||
## 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 Unturned -d \
|
||||
-p 27015-27017:27015-27017 -p 27015-27017:27015-27017/udp \
|
||||
--env 'GAME_ID=1110390' \
|
||||
--env 'GAME_PARAMS=-pei -normal -nosync -pve' \
|
||||
--env 'GAME_PORT=27015' \
|
||||
--env 'UID=99' \
|
||||
--env 'GID=100' \
|
||||
--volume /path/to/steamcmd:/serverdata/steamcmd \
|
||||
--volume /path/to/cs2:/serverdata/serverfiles \
|
||||
ich777/steamcmd:cs2
|
||||
--volume /path/to/unturned:/serverdata/serverfiles \
|
||||
ich777/steamcmd:unturned
|
||||
```
|
||||
|
||||
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/
|
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${SERVER_DIR}/Unturned_Headless_Data/Plugins/x86_64/
|
||||
|
||||
if [ ! -f ${STEAMCMD_DIR}/steamcmd.sh ]; then
|
||||
echo "SteamCMD not found!"
|
||||
wget -q -O ${STEAMCMD_DIR}/steamcmd_linux.tar.gz http://media.steampowered.com/client/steamcmd_linux.tar.gz
|
||||
@@ -50,19 +52,45 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${ROCKET_MOD}" == "true" ]; then
|
||||
if [ ! -f ${SERVER_DIR}/Modules ]; then
|
||||
echo "---Rocket Mod not found, installing---"
|
||||
cd ${SERVER_DIR}
|
||||
if wget -q -nc --show-progress --progress=bar:force:noscroll ${ROCKET_URL} ; then
|
||||
echo "---Rocketmod download complete---"
|
||||
else
|
||||
echo "---Can't download Rocket Mod, putting server into sleep mode---"
|
||||
sleep infinity
|
||||
fi
|
||||
unzip ${SERVER_DIR}/Rocket.zip
|
||||
rm Rocket.zip
|
||||
else
|
||||
echo "---Rocket Mod found---"
|
||||
fi
|
||||
if [ "${ROCKET_FORCE_UPDATE}" == "true" ]; then
|
||||
echo "---Rocket Mod update forced---"
|
||||
cd ${SERVER_DIR}
|
||||
if wget -q -nc --show-progress --progress=bar:force:noscroll ${ROCKET_URL} ; then
|
||||
echo "---Rocketmod download complete---"
|
||||
else
|
||||
echo "---Can't download Rocket Mod, putting server into sleep mode---"
|
||||
sleep infinity
|
||||
fi
|
||||
unzip -o ${SERVER_DIR}/Rocket.zip
|
||||
rm Rocket.zip
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "---Prepare Server---"
|
||||
if [ ! -d ${DATA_DIR}/.steam/sdk64 ]; then
|
||||
mkdir -p ${DATA_DIR}/.steam/sdk64
|
||||
fi
|
||||
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/
|
||||
cp ${STEAMCMD_DIR}/linux64/steamclient.so ${DATA_DIR}/.steam/sdk64/
|
||||
fi
|
||||
chmod -R ${DATA_PERM} ${DATA_DIR}
|
||||
echo "---Server ready---"
|
||||
|
||||
echo "---Start Server---"
|
||||
cd ${SERVER_DIR}
|
||||
${SERVER_DIR}/game/bin/linuxsteamrt64/cs2 ${GAME_PARAMS}
|
||||
${SERVER_DIR}/Unturned_Headless.x86_64 -nographics ${GAME_PARAMS} -port:${GAME_PORT} -sv
|
@@ -38,4 +38,4 @@ while true
|
||||
do
|
||||
wait $killpid
|
||||
exit 0;
|
||||
done
|
||||
done
|
Reference in New Issue
Block a user