-
Notifications
You must be signed in to change notification settings - Fork 68
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
Comments
Hi! That is a great question.
Perhaps use `docker exec` to get into a shell inside your container, then
run `dig` from inside there?
If it works, then it is an issue with networking, connecting from your host
into the Docker service. If it does not work, then the problem is with
actually running dnsd correctly in that container.
(Also, if your needs are modest, dnsmasq may be a plan B as well.)
…On Tue, Aug 14, 2018 at 1:53 PM Kostas Bariotis ***@***.***> wrote:
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
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#22>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABEp_vSEKXj7EAB88XW2rq55axZzVvYks5uQw6HgaJpZM4V85Dr>
.
|
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. :) |
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 |
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
The text was updated successfully, but these errors were encountered: