I'm trying to have local tests working without running consul as DNS server. Which means I'm trying to map web.service.consul
to localhost
.
I've tried creating HOSTALIASES
file but it seems it doesn't support dot in the alias name. I also tried playing with LOCALDOMAIN
and RES_OPTIONS=ndots:10
but can't get this to work.
$ HOSTALIASES=/tmp/ha RES_OPTIONS=ndots:10 LOCALDOMAIN='consul' curl web.services.consul:8080
curl: (6) Could not resolve host: web.services.consul
$
Where /tmp/ha
is
web.services.consul 127.0.0.1
Any ideas? Thanks.
env LOCALDOMAIN=microsoft.com curl www
gets the goods (bads?) for me. I'm not sure a fully qualifiedweb.services.consul
will fly, as that would be looking forweb.services.consul.consul
with yourLOCALDOMAIN
setting. – thrig Aug 21 '16 at 15:15curl
specifically--resolve
overrides other resolution and uses exactly what you specify. In any other program that doesn't help. – dave_thompson_085 Aug 21 '16 at 20:08