How to avoid port exposing, make every container part of the LAN

During development, I don’t wish to see new containers in separate networks, I want them to be accessible from a Windows host like a LAN machine including hostname available to Windows command prompt & browsers. i.e instead of saying HTTP://localhost:19200 I should be able to say HTTP://cmn-es:19200 with zero configuration Windows hosts file etc…

For such a need, what would be the network specs, or is there any other way I must configure each container?

This is my reference servers… suc launching of all the containers part of LAN IP can ease memory as all of them are remembered by name rather with localhost with specific port mapping

I want to travel the world without paying, but some things are just not possible :sweat_smile:

In my experience you got 4 options:

  1. Use cmn.localhost, which most browsers automatically resolve to 127.0.0.1
  2. Add cmn and IP to your local hosts file
  3. Add cmn and IP to your local DSL router, if supported
  4. Use cmn.example.tld with a public domain provider, it can still point to a local IP
1 Like