3 ms·
Yes. > So you'd need to set the DNS to the gateway IP This is the least friction way. Run your own resolver there to resolve names for containers, forward to
by justsomehnguy 3y ago
Yes.
> So you'd need to set the DNS to the gateway IP
This is the least friction way. Run your own resolver there to resolve names for containers, forward to the host's loopback for everything else.
> or dynamically by resolving `host.docker.internal`
Resolving. Name. Of the DNS server. Right?
- judge2020 3y agoI mean dynamically as in a startup script that resolves that hostname, then updates the resolver to the IP it returns.
- justsomehnguy 3y agoAh. This would require adding a script to the image itself, for each image. No go.
- watermelon0 3y agoDoesn't even have to be dynamic, Docker engine knows the IP of the host, so it can just directly configure `/etc/resolv.conf` with it.
- marginalia_nu 3y agoMight not bind on the external interface though.