Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

Unfortunately it did not help. The first thing I did was restart the Docker service, without success. Then I changed the DNS server on my Pi-hole to the one from OpenDNS. According to dnsleak test, now the servers of OpenDNS are used.
But the error message remains exactly the same. When starting the Docker container, first the getaddrinfo error occurs and when trying to request a certificate, the error described above occurs.

Maybe another idea?

EDIT:
What I also want to mention, the Pi-hole is not running in a Docker container but directly on the Pi.