-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Bug: systemd-resolved issues #580
Comments
Hey @ratcashdev , DPS won´t be able to configure itself as the default DNS when running inside a docker container when the host is using system-resolved. Yep, you will do need to restart systemd-resolved using service or systemctl command, see more details about the limitation. If you are using DPS as your primary DNS solver I would recommend follow theses steps to configure it as a service and don't have to reconfigure systemd-resolved at every restart. In alternative you can bypass systemd-resolved and use resolv.conf without the need to restart any service by following these instructions: services:
dns-proxy:
image: defreitas/dns-proxy-server
hostname: dns
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
- type: bind
source: /etc
target: /host/etc
environment:
- MG_RESOLVCONF=/host/etc/resolv.conf
ports:
- "5380:5380" |
HI @mageddo thanks for the quick replay and solution.
can you plz elaborate what is the fundamental issue here? |
Basically systemd-resolved need to be restarted and it's a host program, a host program can't be executed from the docker container as expected by the isolation principle, DPS is running inside a docker container so it can´t restart the host system-resolved at the host. |
@mageddo I have tried your suggested setup above. Unfortunately, it seems it still does not work.
|
I will do a check, looks like DPS hasn't permission to edit |
yeah, pretty much:
|
What is Happening
starting dns-proxy from within a compose file, like:
ping dns
executed from the host saysName or service not known
The logs, in addition contain the entry:
Not possible to restart resolved service: service systemd-resolved restart
Actually, the command
service
is not present on my machine. Onlysystemctl restart systemd-resolved
works.However, even if I restart
resolved
manually, DNS lookup does not work through dns-proxy.What is Expected
systemd-resolved is restarted and DNS lookup works.
Specs
docker version
27.1.2docker run --rm defreitas/dns-proxy-server --version
3.25.10-snapshotThe text was updated successfully, but these errors were encountered: