truncate history
This commit is contained in:
commit
efb7fe4225
3 changed files with 92 additions and 0 deletions
10
Dockerfile
Normal file
10
Dockerfile
Normal file
|
@ -0,0 +1,10 @@
|
|||
FROM zombi/steam-base
|
||||
MAINTAINER MadMaurice <madmaurice@zom.bi>, Paul <paul@zom.bi>
|
||||
EXPOSE 27015/udp
|
||||
|
||||
ADD bin/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +xr /entrypoint.sh
|
||||
USER steam
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["+game_type", "0", "+game_mode", "1", "+mapgroup", "mg_active", "+map", "de_dust2", "+maxplayers", "12", "+rcon_password", "relativegal"]
|
38
README.md
Normal file
38
README.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
## steam-csgo
|
||||
steam-csgo is the base image for an 'CounterStrike: Global Offensive'
|
||||
server.
|
||||
|
||||
### Building steam-csgo
|
||||
|
||||
first build the `steam-base` image.
|
||||
|
||||
```
|
||||
docker build -t zombi/steam-csgo .
|
||||
```
|
||||
|
||||
### Running steam-csgo
|
||||
The image will download the latest server files in case they dont exist,
|
||||
or update them on every run.
|
||||
|
||||
This path should be mounted:
|
||||
`/home/steam/games/`
|
||||
|
||||
```
|
||||
docker run -dit \
|
||||
--name csgo-1 \
|
||||
-p 27015:27015/udp \
|
||||
-p 27015:27015 \
|
||||
-v /data/steam-games/:/home/steam/games/ \
|
||||
zombi/steam-csgo +game_type 0 +game_mode 1 \
|
||||
+mapgroup mg_active +map de_dust2 +maxplayers 12 \
|
||||
+rcon_password relativegal \
|
||||
+sv_setsteamaccount LONGSTEAMACCOUNTTOKEN87470585FF4
|
||||
```
|
||||
|
||||
to start up a simple competetive server to practice some dust2.
|
||||
|
||||
### How do I manage this thing?
|
||||
A rcon password needs to be set with `+rcon_password password`
|
||||
|
||||
### Halp, the server is stuck in LAN mode!
|
||||
you need to have a **valid steamaccount token** to launch a global server.
|
44
bin/entrypoint.sh
Normal file
44
bin/entrypoint.sh
Normal file
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
|
||||
# what are we trying to install?
|
||||
game_nm=csgo
|
||||
game_id=740
|
||||
|
||||
# install game to this directory
|
||||
installdir=/home/steam/games/$game_nm
|
||||
|
||||
# if path does not exist, create it
|
||||
mkdir -p $installdir
|
||||
|
||||
if [[ -w $installdir ]] # can we write into the directory?
|
||||
then
|
||||
# Install or update the game in /home/steam/games/[game name]
|
||||
/opt/steamcmd/steamcmd.sh \
|
||||
+login anonymous \
|
||||
+force_install_dir $installdir \
|
||||
+app_update $game_id validate \
|
||||
+quit
|
||||
else
|
||||
# install dir maybe mounted read-only, simply
|
||||
# skip installing/updating and inform the user.
|
||||
echo "Skipped game installation."
|
||||
fi
|
||||
|
||||
# run the next commands from the installdir
|
||||
cd $installdir
|
||||
|
||||
# is the game launcher not executable?
|
||||
if [[ ! -x ./srcds_run ]]
|
||||
then
|
||||
# we cant run the game then.
|
||||
echo "game launcher not found, installed incorrectly?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# launch the game!
|
||||
exec ./srcds_run \
|
||||
-game $game_nm \
|
||||
-console \
|
||||
-tickrate 128 \
|
||||
-usercon \
|
||||
$@ # append all remaining parameters
|
Loading…
Reference in a new issue