I\'m using docker version 1.10.1 on RHEL 7 and getting npm install error when using below Dockerfile. The Error: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:
I ran into this same issue. My workaround was to attach docker build to a known working and accessible Docker network.
Workaround
docker network lsdocker build --network=By default, Docker uses the default network for building. Setting the network manually ensures the network can access the internet.