You are not logged in.

#1 2023-12-10 17:29:15

unamed^^
Member
From: United State
Registered: 2023-12-10
Posts: 19
Website

[Solved] docker-compose cannot work with DoH?

I use `doh-client` with adding `nameserver 127.0.0.1` into `/etc/resolv.conf`. But the `docker-compose build` cannot resolve the address of `apt` dependencies :/
It turns into normal after I removing the `127.0.0.1` from resolv.conf.
Is there a way to let these two work together?

Last edited by unamed^^ (2024-01-01 03:40:24)


Σ(-᷅_-᷄๑)

Offline

#2 2023-12-11 11:18:09

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,096

Re: [Solved] docker-compose cannot work with DoH?

Have you tried following https://wiki.archlinux.org/title/DNS-over-HTTPS ?

Welcome to archlinux forums.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2023-12-15 01:54:53

unamed^^
Member
From: United State
Registered: 2023-12-10
Posts: 19
Website

Re: [Solved] docker-compose cannot work with DoH?

Sorry for the delay

Lone_Wolf wrote:

Yes I'm currently using this implementation as my local DoH client.
I'm mainly using 1.1.1.1:

# DNS listen port
listen = [
    "127.0.0.1:53",
    "127.0.0.1:5380",
    "[::1]:53",
    "[::1]:5380",

    ## To listen on both 0.0.0.0:53 and [::]:53, use the following line
    # ":53",
]

...

[[upstream.upstream_ietf]]
    url = "https://cloudflare-dns.com/dns-query"
    weight = 50

...
Lone_Wolf wrote:

Welcome to archlinux forums.

Tysm!


Σ(-᷅_-᷄๑)

Offline

#4 2023-12-15 10:24:58

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,096

Re: [Solved] docker-compose cannot work with DoH?

Please post /etc/resolv.conf contents and output of

$ find /etc/systemd -type l -exec realpath '{}' \+

Does nslookup www.google.com  work with 127.0.0.1 in resolv.conf ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2023-12-18 09:37:04

unamed^^
Member
From: United State
Registered: 2023-12-10
Posts: 19
Website

Re: [Solved] docker-compose cannot work with DoH?

Lone_Wolf wrote:

Please post /etc/resolv.conf contents and output of

$ find /etc/systemd -type l -exec realpath '{}' \+
> find /etc/systemd -type l -exec realpath '{}' \+
/usr/lib/systemd/system/sddm.service
/usr/lib/systemd/system/NetworkManager-wait-online.service
/usr/lib/systemd/system/systemd-resolved.service
/usr/lib/systemd/system/bluetooth.service
/usr/lib/systemd/system/doh-client.service
/usr/lib/systemd/system/tlp.service
/usr/lib/systemd/system/NetworkManager.service
/usr/lib/systemd/system/remote-fs.target
/usr/lib/systemd/system/docker.service
/usr/lib/systemd/system/NetworkManager-dispatcher.service
/usr/lib/systemd/system/systemd-timesyncd.service
/usr/lib/systemd/system/systemd-resolved.service
/usr/lib/systemd/system/systemd-timesyncd.service
/usr/lib/systemd/system/getty@.service
/usr/lib/systemd/system/bluetooth.service
/usr/lib/systemd/user/p11-kit-server.socket
/usr/lib/systemd/user/pipewire-pulse.socket
/usr/lib/systemd/user/pipewire.socket
/usr/lib/systemd/user/gcr-ssh-agent.socket
/usr/lib/systemd/user/xdg-user-dirs-update.service
/usr/lib/systemd/user/wireplumber.service
/usr/lib/systemd/user/wireplumber.service

And

> cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 127.0.0.1
Lone_Wolf wrote:

Does nslookup www.google.com  work with 127.0.0.1 in resolv.conf ?

Yes,

dig google.com@127.0.0.1

; <<>> DiG 9.18.20 <<>> google.com@127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 12819
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;google.com\@127.0.0.1.         IN      A

;; AUTHORITY SECTION:
.                       86400   IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2023121800 1800 900 604800 86400

;; Query time: 59 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Mon Dec 18 01:35:32 PST 2023
;; MSG SIZE  rcvd: 124

Σ(-᷅_-᷄๑)

Offline

#6 2023-12-18 11:31:31

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,096

Re: [Solved] docker-compose cannot work with DoH?

/usr/lib/systemd/system/systemd-resolved.service

systemd-resolved is not very good at cooperating with other dns resolution methods.

In order to get this to work you'll have to configure systemd-resolved , NetworkManager and doh-client to work together.
Taking systemd-resolved out of the equation may be the best way to simplify your DNS resolution setup .


Some links for background info
https://wiki.archlinux.org/title/Openresolv
https://wiki.archlinux.org/title/System … NS_servers
https://wiki.archlinux.org/title/Networ … management


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#7 2023-12-28 13:35:18

unamed^^
Member
From: United State
Registered: 2023-12-10
Posts: 19
Website

Re: [Solved] docker-compose cannot work with DoH?

Sorry for the delay - I'm on my break.

Lone_Wolf wrote:
/usr/lib/systemd/system/systemd-resolved.service

Taking systemd-resolved out of the equation may be the best way to simplify your DNS resolution setup .

Tysm! This works for me so far (by disabled and stopped that service in systemctl)
Happy new year!


Σ(-᷅_-᷄๑)

Offline

#8 2023-12-29 12:28:47

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,096

Re: [Solved] docker-compose cannot work with DoH?

Glad to have helped.

Please prepend [Solved] to the thread title (edit first post).


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB