Docker Community Forums

Share and learn in the Docker community.

Docker swarm - multiple IP addresses

What would be the best strategy to setup multiple swarm servers to listen on the same port but using different IP addresses?

For example we have a test & staging environment setup as swarm services behind the docker flow reverse proxy (listening on port 80) at & http://10.0.01/Staging/content.html which routes the requests to the back end services.

We would ideally like to add more IP addresses to our server so that for the test environment you can go to and for staging go to for example then we could host each site in the root folder of the URL.

Br, Mason

I’d be also interested in this. If it helps, here’s a use case:
I’d like to run pihole and a (few) web server(s) on a Raspberry Pi.

  1. I’d need a dedicated IP address for the DNS to be distributed to my clients, that can be shared on the Swarm
  2. As the PiHole and also the Web Servers expose their web services on tcp/80 and tcp/443 and I’d like to have IP addresses for them each service well which can then be used by the Swarm nodes

Is anything of this possible?

The original scenario was a matter of placement constraints and port publishing in host mode (to bypass ingress).

You scenario is a floating ip scenario. The forum search should point you to the right direction.