feat: forward guest DNS to Docker's embedded resolver#793
Open
alimx07 wants to merge 2 commits into
Open
Conversation
✅ Deploy Preview for urunc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
e43d8cc to
25a6350
Compare
On Docker user custom networks the DNS resolver (127.0.0.11) is loopback only and unreachable by the unikernel guest. Detect this case per container, expose the resolver via a virtual resolver IP using tc redirects between the tap and lo + a PREROUTING DNAT, and rewrite the guest's resolv.conf to point at that IP. Signed-off-by: Ali Mohamed <amx746@gmail.com>
Signed-off-by: Ali Mohamed <amx746@gmail.com>
25a6350 to
a743f29
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On Docker user custom networks the DNS resolver (127.0.0.11) is loopback only and unreachable by the unikernel guest. Detect this case per container, expose the resolver via a virtual resolver IP
(Last Subnet IP)using tc redirects between the tap and lo + a PREROUTING DNAT(for DNS server ports), and rewrite the guest'sresolv.confto point at that IP in our unikernel islinuxone.Three TC rules added on tap and lo:
src=ResolvIPinto TapRelated issues
How was this tested?
Tested in user custom docker network with urunc container
u1and normal oneu2:u1lookup ongithub.comu1lookup onu2u2lookup onu1LLM usage
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).