In more recent versions of docker desktop for windows (currently using 4.29) dns lookup breaks down quite often.
Sometimes it is only external connections that fail, in which case I need to restart the whole PC in order to fix the issue.
More recently I noticed internal connection fail randomly. At some point the I get a dns lookup failure for a connection between containers and afterwards it resumes as if nothing happened.
In the container logs I get this error (image based on node:14-alpine):
Error: getaddrinfo EAI_AGAIN scoreexpress-db
2024-05-14 17:10:48 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26)
Not sure since what version this issue is happening.
Any clues on where to look for solutions would be helpful.
We have the same issue. In docker for mac 4.28 no problems. In later versions getting DNS resolution failures in node.js container. If we terminal into the container / pod and do an nslookup we get the correct address. It’s really odd. Seems like something got really messed up / confused with the 4.29+ releases. Our dns entries in in our /etc/host
We ended up replacing the alpine image we used as a base to build our application containers with a debian base.
After that, we haven’t seen this issue anymore.
Interesting. It should not depend on the image, unless the libraries in the image are somehow unstable. You can still report it on GitHub, if you see this error with the latest Docker Desktop as well, since v4.29 is not the latest. There is v4.34.3 now.