Edit: Apparently the consul inside container cannot reach the outside...
When I let server listen on the docker host ip address seen from inside the consul docker container,
it works.
I run the server demo and let it connect to consul in a container:
./server -addr 127.0.0.1:5000 -name svc-a -prefix domain.com/foo -consul 127.0.0.1:8500
2015/12/07 16:17:49 Listening on 127.0.0.1:5000 serving domain.com/foo
2015/12/07 16:17:49 Registered service "svc-a" in consul with tags "urlprefix-domain.com/foo"
The new service is listed in consul web GUI,
however, although it listens on port 5000, it doesn't pass the consul health check,
therefore it is not listed in the routing table in fabio web GUI.
Service 'svc-a' check service:svc-a-127.0.0.1:5000 critical
NOTES
OUTPUT
Get http://127.0.0.1:5000/health: dial tcp 127.0.0.1:5000: connection refused
Edit: Apparently the consul inside container cannot reach the outside...
When I let server listen on the docker host ip address seen from inside the consul docker container,
it works.
I run the server demo and let it connect to consul in a container:
The new service is listed in consul web GUI,
however, although it listens on port 5000, it doesn't pass the consul health check,
therefore it is not listed in the routing table in fabio web GUI.