Hi there!
Question: Is there any possibility to access host IP and random port mapping info inside container?
I have non-common service scenario, my case is cluster for MOBA(multiplayer online battle arena) game.
Each battle runs on individual instance of battle-server(container). Battle-server at start should register itself in registry by providing its public IP and port and its status(BUSY, WAITING).
So I planned to create a service with random port mapping and just scale it to amount of instances depends on current workload. But I didn’t find how to access public IP and random port mapping info within container.
Another variant that I think will work is starting containers with ‘host’ network and give possibility to use any free port to application…
Or maybe someone can suggest better solution?
Thank you!