Open exzizt opened 6 years ago
What url are you visiting to view the game? Please ensure that you're visiting it at http://localhost:3000, otherwise you will receive the transport error (it's a CORS check).
I have to go to "192.168.99.100:3000" since it is running the app in a docker virtual machine. Using localhost would resolve to my host computer's IP and not work.
Okay I understand now. Getting this to work with different hosts will require modifying the Dockerfile to accept a hostname to override env it currently has.
In the meantime, can you run with --net=host
and see if that allows you to connect via localhost:3000?
I tried that out and it didn't work. I can still only connect via "192.168.99.100:3000".
The command I ran is:
docker run -it -p 3000:3000 --net=host battlesnake/battle_snake
On another note, since I have Windows 10 Pro I am able to use "Docker for Windows" to run the app (after enabling Hyper-V). This runs the app on my host machine (localhost:3000) and everything is working fine.
However, it would still be nice to get to the bottom of this issue as I'm sure other people will have it and not many people have Windows 10 Pro.
Edit: I am still willing to troubleshoot!
@exzizt Change the HOST
environment variable that's in the Dockerfile
(https://github.com/battle-snake/battle_snake/blob/master/Dockerfile#L90) to have the ip of your public network. I ran the container with kitematic and changed it there, not sure how to do that in the docker cli (but I'm sure there's a way)
I run the app with Docker:
I then try to create a game with my snake URLs and get the above error message. Note that everything works fine with the 2017 server. Docker app is running on 192.168.99.100. My LAN is 10.104.35.xxx. An online snake on a hosting site also gets the same error message.