CM2Walki / CSGO

Dockerfile for automated build of a CS:GO gameserver: https://hub.docker.com/r/cm2network/csgo/
https://CM2.Network
MIT License
249 stars 74 forks source link

Should this image work for creating local server? #54

Closed bCamba closed 3 years ago

bCamba commented 3 years ago

I want to try this image without doing it in an actual server/cloud. However I tried without success, even though the container logs seem to be indicating the server started successfully.

1 - Should I be able to connect locally if I start a container with the following command?

docker run -d --net=host --name=csgo-dedicated -e SRCDS_TOKEN={YOURTOKEN} cm2network/csgo

2 - Do I even need to pass the SRCDS_TOKEN to run this image locally? 3 - If I can run this image locally, should it automatically appear listed in the LAN servers in CSGO or do I need to run a command to connect in CSGO?

bCamba commented 3 years ago

I figured out why I could not connect to it locally. I was running docker on windows 10 with WSL2 and --net=host option does not work with windows 10 with WSL2. I can confirm binding the ports manually works. docker run -d -p 27016:27016/tcp -p 27016:27016/udp -p 27021:27021/udp --name=csgo-dedicated -e SRCDS_PORT=27016 -e SRCDS_TV_PORT=27021 -e SRCDS_TOKEN={YOURTOKEN} cm2network/csgo