Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run dnsd inside a container #22

Open
kbariotis opened this issue Aug 14, 2018 · 3 comments
Open

Run dnsd inside a container #22

kbariotis opened this issue Aug 14, 2018 · 3 comments

Comments

@kbariotis
Copy link

Is there a way to run this service inside a container?

I tried the first example (the one that returns 1.2.3.4 always) with a Dockerfile that exposes port 6464 and then built it and ran it with the command:

> docker run --name dns -d --restart=always --publish 53:6464/tcp --publish 53:6464/udp --volume :/code dns

When I run dig:

> dig @localhost -p 53 foo.example A

I get:

;; connection timed out; no servers could be reached.

I am running MacOSX and I am trying to setup a local DNS server that I can then add into the /etc/resolv.conf as a nameserver.

Thank you

@jhs
Copy link
Member

jhs commented Aug 14, 2018 via email

@kbariotis
Copy link
Author

kbariotis commented Aug 14, 2018

Actually running it directly from my laptop (not inside a container) works fine. Haven't tried to log into the container, will do though.

I am experimenting to find a way to access containers (different ports on localhost) using domain names. I want to setup my MacOS to use the localhost as a nameserver that will then redirect requests to a local reverse proxy.

Several solutions I've found online didn't work for me so I thought I would play around a bit. :)

@jhs
Copy link
Member

jhs commented Aug 15, 2018

Also, something I have seen is that MacOS is able to use a custom DNS server for a specific domain

So rather than have a server "proxy" your queries, you could possibly just run dnsd but tell MacOS to query it only for a specific domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants