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:

https://docs.docker.com/engine/userguide/networking/get-started-overlay/

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. dev.example.com to “web” internal?

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

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.