Hi I have similar problem to this: docker npm install Error: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
But I use Docker for Windows, and can't find a workaround for my issue. I also use it with Minikube. I try to build my image on Minikube with steps like this:
- eval $(minikube docker-env)
- docker build -t app-frontend .
and I get response like below:
Step 6/9 : RUN npm install
---> Running in 8275f15b4a16
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/@angular%2fcommon failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-12-19T18_46_29_669Z-debug.log
I don't know how to use it. https://development.robinwinslow.uk/2016/06/23/fix-docker-networking-dns/
I found my DNS servers are in Ipv6
ipconfig /all | findstr /R "DNS\ Servers"
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
DNS Servers . . . . . . . . . . . : 2001:730:3ed2:1000::53
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
But after I try use one of that DNS I got this:
$ docker run --dns fec0:0:0:ffff::1%1 busybox nslookup google.com
invalid argument "fec0:0:0:ffff::1%1" for "--dns" flag: fec0:0:0:ffff::1%1 is not an ip address
I'm stuck I can't find anything on the Internet, any suggestion?