Skip to content

Commit

Permalink
Merge pull request #106 from avoidik/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
joedwards32 authored Apr 6, 2024
2 parents da6af92 + 9c3fb1d commit dbb5409
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ This Docker image contains the dedicated server of the game.

Running using Docker:
```console
$ docker run -d --name=cs2 -e SRCDS_TOKEN={YOURTOKEN} -p 27015:27015/tcp -p 27015:27015/udp -p 27020:27020/tcp joedwards32/cs2
$ SRCDS_TOKEN="..." # check https://steamcommunity.com/dev/managegameservers
$ docker run -d --name=cs2 -e SRCDS_TOKEN="$SRCDS_TOKEN" -p 27015:27015/tcp -p 27015:27015/udp -p 27020:27020/udp joedwards32/cs2
```

Running using a bind mount for data persistence on container recreation:
```console
$ mkdir -p $(pwd)/cs2-data
$ chmod 777 $(pwd)/cs2-data # Makes sure the directory is writeable by the unprivileged container user
$ docker run -d --name=cs2 -e SRCDS_TOKEN={YOURTOKEN} -v $(pwd)/cs2-data:/home/steam/cs2-dedicated/ -p 27015:27015/tcp -p 27015:27015/udp -p 27020:27020/tcp joedwards32/cs2
$ chown 1000:1000 $(pwd)/cs2-data # Makes sure the directory is writeable by the unprivileged container user with uid 1000, known as steam
$ SRCDS_TOKEN="..." # check https://steamcommunity.com/dev/managegameservers
$ docker run -d --name=cs2 -e SRCDS_TOKEN="$SRCDS_TOKEN" -v $(pwd)/cs2-data:/home/steam/cs2-dedicated/ -p 27015:27015/tcp -p 27015:27015/udp -p 27020:27020/udp joedwards32/cs2
```

or using docker-compose, see [examples](https://github.com/joedwards32/CS2/blob/main/examples/docker-compose.yml):
Expand Down

0 comments on commit dbb5409

Please sign in to comment.