N
N
nobody way2020-03-19 19:12:14
Computer networks
nobody way, 2020-03-19 19:12:14

Why can't I login to the local Counter-Strike server running in Docker under Windows 10?

I decided to try myself in the newfangled Docker technology.
As a practice, I took as an example a server for the game CS1.6.

I first tried this on a Linux distribution (ArchLinux) running on an old netbook on the same network as my PC connected via Wi-Fi through a router .

So:
1) I created a container from this image https://hub.docker.com/r/hlds/server/ with the following command

docker run -d -p 27015:27015 -e START_MAP=de_inferno -e ADMIN_STEAM={тутбылмойстимайди} -e SERVER_NAME="My Server" --name cs hlds:alpha

2) Launched. I did port forwarding on the router from 27015 to 27015 of my netbook.
3) I was able to connect through the game client. My friend was also able to connect with me.

I decided to do the same under a PC on Windows 10 . Installed Docker Desktop . Enabled Hyper-V

First, I decided to test it on the nginx docker. Created a container with nginx. In the browser, his test page calmly opened.

Then the CS1.6 server followed again.
I did the same steps , the server started up. From the logs it was clear that the game was going on (rounds were changing). However, through the client, I could not connect to it .
I tried to connect via localhost(192.168.0.2 ) of your PC, on which the docker with the server is running. The server itself uses port 27015 . That is, I connected like this:
connect 192.168.0.2:27015

Maybe I'm missing something, but for some reason I'm firmly convinced that the problem is somehow locally tied to Windows 10 and its network. Everything works on Linux. How to fix, gentlemen?

UPD1: Started the server without docker -> works. Hmm...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question