r/droneci • u/CrazyKing11 • Aug 09 '21
Question Build Docker Image with Private NPM Registry
Hey guys,
I need to build a Docker Image and push it to a private docker registry.
For now I use the docker plugin to do that, but here comes the problem.
When I do an "npm install" inside my Dockerfile, I get an "failed, reason: getaddrinfo ENOTFOUND" error, because I use a private npm registry from where I get the packages.
Now I dont fully understand the error I get there. Does that mean he cannot reach the address or he doesnt even understand how to resolve the hostname?
Can someone help me get this working.
---
More Info:

Dockerfile (for vue.js app)
FROM node:latest as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm config set strict-ssl false
RUN npm install
COPY ./ .
RUN npm run build
FROM nginx:1.20 as production-stage
ENV TZ="Europe/Berlin"
RUN mkdir /app
COPY --from=build-stage /app/dist /app
COPY nginx.conf /etc/nginx/nginx.conf



