how does dns resolution work? #736
Unanswered
christhomas
asked this question in
Q&A
Replies: 1 comment 3 replies
-
The hostResolver is a DNS stub resolver that runs on the host, resolves names using the macOS or Linux resolver, and then provides that data to the guest VM via DNS. This is the only nameserver exposed to the VM, so all requests should go through this channel. So if your local dnsmasq is configured in a way that the host uses it to look up names, then everything should work automatically. Have you tried it? Did it not work? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a need to run a dnsmasq container for special application level setup which can be dynamic as part of a local development toolkit. The idea is to run custom domains locally and use a dnsmasq container to resolve them to the local machine.
From what I understand, docker runs it's own dns resolver for special situations where it needs to do a similar thing, resolve things that only matter to the local docker machine and kubernetes does something similar with coredns and resolves it's special internal names.
I think lima also has something similar according to some issues and tickets that I've read, so it makes sense that the container software itself runs it's own private dns for things it needs to resolve. But then how does everything else get resolved? Do all those requests go to the host machine which uses it's own configured dns resolvers to do the rest of the work?
If so, that would mean my setup would work because what I do is set a custom ip address for all domains that I want to cater for and then listen on the host machine's port 53, falling back to the host machines router (the adsl box or whatever the machine is configured with) for any public dns stuff.
So I suppose in this setup, there are three dns resolvers: docker(private docker things), my toolkit(my custom domains), the router(everything else)
Does anybody know how I could get that setup working with lima? maybe the useHostResolver option does exactly this behaviour? Anybody have any advice?
Beta Was this translation helpful? Give feedback.
All reactions