Closed Leafgard closed 5 years ago
Hi,
I got it to work by adding EXPOSE 27015/udp and so on for every port at the end of the Dockerfile and then built it from scratch. If you have your image built already you may consider trying to use the -p flag with the docker run command and exposing the ports with udp that way (haven't tried it this way though). Good luck!
@Leafgard Can you give me your full docker run command? I suspect that you missed a port publish like @Saltzmann suggested.
@Saltzmann I will try it ! :p Thanks
@CM2Walki It looks like docker run -d --net=host --name=csgo-dedicated -e SRCDS_TOKEN=mytoken -e SRCDS_PW=mypassword -e SRCDS_RCONPW=myrconpassword cm2network/csgo
!
But.. why should I expose the port if the used net is host ?
(I mean, i can connect myself to the csgo server using csgo, so why am I unable to connect to RCON xD)
Thanks, I was just checking which variation you used and indeed when you use --net=host you don't need to publish any ports, it will mount the host interface directly.
Do you have any secondary interfaces setup? Like a second virtual interface? Try the solution from here: https://forums.alliedmods.net/showpost.php?s=35ec7fb3052dd59ba03afcc82a0cc218&p=2268614&postcount=3
Add:
-console -usercon +net_public_adr xx.xx.xx.xx +ip xx.xx.xx.xx -port 27015
I'm fairly sure that shouldn't be necessary but who knows.
@CM2Walki Thanks for your response!
I thought the same about port exposure!
To be honest, I don't think there is any other secondary interface, because i'm using a public cloud virtual instance by OVH to make it run ! I should only have one interface on the instance sooo..!
I will try this and give you a feedback as fast as possible! 👍
Thanks for everything again!
It works !! Awesome !!
I manually added the line you told me to, (without playing with Envs, but putting ip directly into the line) and it works nice ! :)
Beautiful ! 🏆
May I tip you somewhere ? ☕️
Thanks again !
Glad it works! You don't need to tip me but you could star the repository :)!
Thanks, I was just checking which variation you used and indeed when you use --net=host you don't need to publish any ports, it will mount the host interface directly.
Do you have any secondary interfaces setup? Like a second virtual interface? Try the solution from here: https://forums.alliedmods.net/showpost.php?s=35ec7fb3052dd59ba03afcc82a0cc218&p=2268614&postcount=3
Add:
-console -usercon +net_public_adr xx.xx.xx.xx +ip xx.xx.xx.xx -port 27015
I'm fairly sure that shouldn't be necessary but who knows.
Hey quick question - how can I implement those start options in a docker-compose file ? Tried everything and RCON still gives me this...
Hey !
I just created my CSGO container using your Dockerfile ! I did pass the SRCDS_RCONPW with password to environment variables, but RCON access is not working :/ In CSGO, it says "Unable to connect to remote server"..
Do you have a trick, or do you think I missed something ?
When inspecting container, Env array gives the good key with the good password, and it looks like to start the container using -usercon and +rcon_password $SRCDS_RCONPW, so I don't understand why it doesn't work :/
Thanks ! :p