Apart from the potential utility of having a proxy that is configured automatically whenever a service is created or removed, swarm-listener shows how useful it is to leverage the Docker Remote API. If you have your own needs that are not fully covered with Docker or one of the tools in its ecosystem, it is relatively easy to write your own service on top of the API. The truth is that, at the time this chapter was written, the Swarm Mode is only a couple of months old, and there aren’t many third party tools that can be used to fine tune or extend its behavior. Even if you find all the tools that do more or less what you need, it’s still a good idea to write a bit of code yourself and switch from more or less to exactly what you need.
I encourage you to fire up your favorite editor and write a service in your programming language of choice. You can monitor services and send yourself an email...