0

The scenario is like this:

I have a .net Core docker image that runs on a laptop, where other laptops should be able to access it, ususally on an ad hoc local network with no internet access.

On the server laptop it is just: http://localhost:23456

But when other laptops connects it is something like: http://192.168.1.12:23456

So I would like that when at app is started up on the server laptop on: http://localhost:23456 the app could resolve the hosts IP address and write:

"For client laptops connecting to this server use this address: http://192.168.1.12:23456"

barnonline
  • 315
  • 4
  • 11
  • This is what you're asking? docker container ip within a .net core application – Ashok Oct 22 '20 at 10:05
  • 1
    This is something Docker intentionally hides from you. The linked question has several ways to get _an_ address, but for this particular application the better answers come down to "pass it in as an environment variable". – David Maze Oct 22 '20 at 11:04

0 Answers0