Docker Community Forums

Share and learn in the Docker community.

Docker Swarm 1.13 External DNS Routing

I have a dev environment for my website on my laptop that I want to serve external requests. I’ve created 3 machines following these instructions:

Consul is my key-store and I’ve got an nginx instance running that is accessible over the overlay network as “web”. How do I route external requests to the swarm: i.e. to “web” internal?

If I’m right about what I think you want to do, I’d recommend using @vfarcic’s Docker Flow: Proxy.

If you use “docker service create” the swarm-listener will automatically update an HAproxy container with the external DNS to internal container name mapping.

You have to launch the container with a couple of --label entries.

Here’s a video how I use it. Perhaps it will help you.