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

Running on OS X on Docker Desktop #105

Closed juanca closed 1 year ago

juanca commented 1 year ago

Hello! I am trying to run a private server for a group of friends. I have something running but I am running into a few issues. Does anyone have an understanding of any of these? Quick fixes? Etc?

My setup:

Docker compose file:

services:
  csgo:
    container_name: csgo-dedicated
    image: cm2network/csgo
    ports:
      - "27015:27015/udp"
    volumes:
      - ./csgo-server/:/home/steam/csgo-dedicated/
    environment:
      SRCDS_TOKEN: "SECRET TOKEN"
      SRCDS_WORKSHOP_AUTHKEY: "SECRET AUTHKEY"
      SRCDS_HOSTNAME: "My Super Cool Gaming"
      SRCDS_PW: "supercoolpassword"
      SRCDS_RCONPW: "rconcoolpassword"
      SRCDS_MAXPLAYERS: "14"

Issues:

  1. Server name is hardcoded to the literal string "{{SERVER_HOSTNAME}}" regardless of SRCDS_HOSTNAME env
  2. network_mode: "host" does not expose server outside of the local computer. I disabled all firewalls, enabled DMZ, etc. I have to explicitly expose the above port. Do I only need "27015:27015/udp"?
  3. Server shows in the "Internet" tab with its public IP. Connecting works. I can also connect to the server fine with the console command connect <PUBLIC IP>; password <PASSWORD>
  4. Server shows in the "Lan" tab twice. One of them does not respond at all. The other does connect. I can also connect with connect <PRIVATE LAN IP>; .... Why does it show up twice?
juanca commented 1 year ago

Add another to the list:

  1. SRCDS_RCONPW does not seem to work. After setting the rcon_password in the console, it does not connect to the same server IP. e.g. rcon status
diclophis commented 1 year ago

Have you tried running the CSGO server container on a kubernetes cluster?