The client you ran that nslookup from is not using Pi-hole for DNS, but a stub resolver on that machine's 127.0.0.53.
That stub resolver in turn seems to use Pi-hole, at least in one of its upstream's resolution chain, but you want to verify that Pi-hole is its sole upstream, lest it would bypass Pi-hole via any alternate DNS servers.
Your dockered Pi-hole returns 0.0.0.0 as its address, which indicates that you haven't yet set FTLCONF_LOCAL_IPV4
for your Pi-hole container, see Recommended Variables.
Your debug log also shows two DHCP active servers:
* Received 349 bytes from ens160:192.168.0.62
Offered IP address: 192.168.0.63
DHCP options:
Message type: DHCPOFFER (2)
router: 192.168.0.1
dns-server: 192.168.0.1
* Received 548 bytes from ens160:192.168.0.1
Offered IP address: 192.168.0.63
DHCP options:
Message type: DHCPOFFER (2)
router: 192.168.0.1
dns-server: 192.168.0.1
Both distribute your router's 192.168.0.1 as DNS server, suggesting that router is configured to use Pi-hole as its upstream. Again, you'd want to verify that Pi-hole is its sole upstream.
Using Pi-hole as your router's upstream is a valid configuration, but note that you would not be able to attribute DNS requests to individual clients in Pi-hole's Query Log, as all requests are coming from your router.
To see individual clients, your router would have to be configured to propagate your Pi-hole host's IPs as local DNS server.
Your debug log also shows that you've enabled Pi-hole's Conditional Forwarding, but for a local domain name that matches neither of the two distinct domains as distributed by your DHCP server.
Unless you match the local domain name with one of those two domains, local FQDNs as known by the forwarding target would fail to resolve.
Also note that since your two DHCP servers distribute two different local/search domains, only one of those names would be able to resolve in your current configuration.
Unless you really require it, you should probably disable the second DHCP server in your network.
As for your issue:
I do not see any local DNS records shadowing my-domain.com
or sub.my-domain.com
configured in your Pi-hole.
It would thus be expected that respective requests would return public DNS records.
Note that if you'd only shadow my-domain.com
in Pi-hole, requests for sub.my-domain.com
would be forwarded to and answered by a public DNS server.