Reputation: 163
Hi im trying dockerizing my project in node and react, mi operative system is CentOS 8.1,version node 12.16.1 and Docker version 19.03.8. I follow the tutorial from node https://nodejs.org/fr/docs/guides/nodejs-docker-webapp/ my docker file is the next
FROM node:12
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
CMD ["npm","start"]
and .dockerignore is
node_modules
npm-debug.log
when i build i have error in step 4 npm install
Step 4/6 : RUN npm install
---> Running in 922fd6d848a1
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org
I hope can help me, thanks for reading
Upvotes: 2
Views: 6528
Reputation: 163
if someday any have this problem you can resolve with this
docker build . --network host -t mytag ..
or another suggestion suggestion you can check the following link
https://github.com/StefanScherer/dockerfiles-windows/issues/270
Upvotes: 7