DNS resolution time slow in docker container

My Raspberry PI recently died, so I decided to run pihole on docker (Windows).
While it functions correctly, the performance is bad.

By performance I mean, the response time for DNS resolution.
At first I thought it could be the upstream server, so I tested by disabling blocking in the web UI.

The response times were still very slow.
Has anyone experienced this before and if so, how did you resolve it?

Below is my docker-compose file

version: "3.8"

# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      # - "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
      - "8080:80/tcp"
    environment:
      TZ: 'America/Detroit'
      WEBPASSWORD: 'whatever'
      PIHOLE_DNS: '1.1.1.1:1.1.1.1'
    # Volumes store your data between container upgrades
    volumes:
      - './etc-pihole:/etc/pihole'
      - './etc-dnsmasq.d:/etc/dnsmasq.d'
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    cap_add:
      - NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
    restart: unless-stopped

Debug Token URL: https://tricorder.pi-hole.net/M6G8r6PN/
Log File Contents:

*** Explicit debug log removed by moderator to protect user privacy***

This sounds simliar to Websites timing out then working again.

If you'd currently be using Docker Desktop for Windows 4.19, rolling back to 4.18 may be an option.

So I'm on 4.21.1

Any idea if the issue still exists in this version? I could remove docker completely and install 4.18 as a test, if need be.

No, since you are the first to report this version (at least in this forum :wink: ).

Not related, but you are passing a meaningless environment variable (click for details).

PIHOLE_DNS is not one of Pi-hole's environment variables, so Pi-hole would never try to read that variable's value.

You may want to use PIHOLE_DNS_ instead, make sure you are using the correct value syntax and also be aware that this option would override UI provided upstream DNS servers.

You probably should be aware that Windows Docker isn't the best choice for running your Pi-hole.
It's ok with Docker's default brigde network driver, but if you would require more advanced networking, you may find that those are currently not supported by Docker on Windows (e.g. if you'd intend to run your Pi-hole as DHCP server, that would reuire Docker's host or macvlan drivers instead).