Added support for Steam Guard key to be provided as environment variable
This commit is contained in:
parent
99b24290bb
commit
d51908fe3c
3 changed files with 5 additions and 2 deletions
|
@ -35,8 +35,9 @@ $ docker run -d --net=host -v $(pwd)/cs2-data:/home/steam/cs2-dedicated/ --name=
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
Feel free to overwrite these environment variables, using -e (--env):
|
Feel free to overwrite these environment variables, using -e (--env):
|
||||||
```dockerfile
|
```dockerfile
|
||||||
STEAMUSER="changeme" (Steam User for SteamCMD. Steam Guard must be disabled.)
|
STEAMUSER="changeme" (Steam User for SteamCMD.)
|
||||||
STEAMPASS="changeme" (Password for Steam User.)
|
STEAMPASS="changeme" (Password for Steam User.)
|
||||||
|
STEAMGUARD="" (Optional, Steam Guard key if enabled. Use your most recent Steam Guard key.)
|
||||||
CS2_PORT=27015 (CS2 server listen port tcp_udp)
|
CS2_PORT=27015 (CS2 server listen port tcp_udp)
|
||||||
CS2_RCONPW="changeme" (RCON password)
|
CS2_RCONPW="changeme" (RCON password)
|
||||||
CS2_PW="changeme" (CS2 server password)
|
CS2_PW="changeme" (CS2 server password)
|
||||||
|
|
|
@ -7,6 +7,7 @@ LABEL maintainer="joedwards32@gmail.com"
|
||||||
|
|
||||||
ENV STEAMUSER "changeme"
|
ENV STEAMUSER "changeme"
|
||||||
ENV STEAMPASS "changeme"
|
ENV STEAMPASS "changeme"
|
||||||
|
ENV STEAMGUARD ""
|
||||||
ENV STEAMAPPID 730
|
ENV STEAMAPPID 730
|
||||||
ENV STEAMAPP cs2
|
ENV STEAMAPP cs2
|
||||||
ENV STEAMAPPDIR "${HOMEDIR}/${STEAMAPP}-dedicated"
|
ENV STEAMAPPDIR "${HOMEDIR}/${STEAMAPP}-dedicated"
|
||||||
|
|
|
@ -4,11 +4,12 @@ mkdir -p "${STEAMAPPDIR}" || true
|
||||||
# Download Updates
|
# Download Updates
|
||||||
|
|
||||||
bash "${STEAMCMDDIR}/steamcmd.sh" +force_install_dir "${STEAMAPPDIR}" \
|
bash "${STEAMCMDDIR}/steamcmd.sh" +force_install_dir "${STEAMAPPDIR}" \
|
||||||
+login "${STEAMUSER}" "${STEAMPASS}" \
|
+login "${STEAMUSER}" "${STEAMPASS}" "${STEAMGUARD}" \
|
||||||
+app_update "${STEAMAPPID}" \
|
+app_update "${STEAMAPPID}" \
|
||||||
+quit
|
+quit
|
||||||
|
|
||||||
# Rewrite Config Files
|
# Rewrite Config Files
|
||||||
|
|
||||||
if [[ ! -z $CS2_BOT_DIFFICULTY ]] ; then
|
if [[ ! -z $CS2_BOT_DIFFICULTY ]] ; then
|
||||||
sed -i "s/bot_difficulty.*/bot_difficulty ${CS2_BOT_DIFFICULTY}/" /home/steam/cs2-dedicated/game/csgo/cfg/*
|
sed -i "s/bot_difficulty.*/bot_difficulty ${CS2_BOT_DIFFICULTY}/" /home/steam/cs2-dedicated/game/csgo/cfg/*
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue