I have a Node.JS / Express.JS server-side program, which I run inside a Node.JS docker container. It was working for the last ~2 years, now it produces a strange error upon installing. I use docker-compose to install / run the program.
The Dockerfile:
FROM node:10
ARG PORT
ENV PORT ${PORT}
# Create app directory
ADD backend /app
WORKDIR /app
RUN npm ci --only=production
EXPOSE $PORT
CMD ["npm", "run", "start-prod"]
When I try to install it (with docker-compose, it fails every time, with this message:
Building backend
Step 1/10 : FROM node:10
---> a8441ebf4e4d
Step 2/10 : ARG PORT
---> Using cache
---> d985b4141806
Step 3/10 : ENV PORT ${PORT}
---> Using cache
---> e053f5bb49fa
Step 4/10 : ADD backend /app
---> Using cache
---> 409d0ab160ea
Step 5/10 : WORKDIR /app
---> Using cache
---> b7aad109486b
Step 6/10 : RUN cp environment-prod-docker.js environment.js
---> Using cache
---> 218df5ff1cff
Step 7/10 : RUN cat environment.js
---> Using cache
---> 87965e20e57e
Step 8/10 : RUN npm ci --only=production
---> Running in 9352da8c367e
npm WARN prepare removing existing node_modules/ before installation
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
I have read that it might be possible that this is a proxy error. I have tried to change to my home wifi, my home cable, and mobile data: still produced the same error. If I copy the link, I can download the said .tgz file from the browser.