kaimallea / csgo

A containerized dedicated server for Counter-Strike: Global Offensive
The Unlicense
242 stars 58 forks source link

Q: Interact with compose container #16

Closed gardc closed 4 years ago

gardc commented 4 years ago

How do I interact with the server container spawned via docker compose? I want to type commands in the server console.

kaimallea commented 4 years ago

Hi, when you start the server with docker-compose you should detatch from it -- using -d or --detach-- to send it to the background (e.g., docker-compose up --detach).

Then you can use docker attach <container-id> to attach to the container where you can type directly into the srcds console. Here's an example of me attaching and then typing status to see the server's status, followed by meta version to see the version of the Metamod's plugin:

Important: you must use the keyboard combination Ctrl+P, Ctrl+Q to disconnect. If you use Ctrl+C you will be sending that to the srcds console which will stop the server

ScreenFlow