I have a problem when I want to build a docker image with the docker plugin. Everything works fine when I use it “normally”, but when I need to access a private npm registry from my Dockfile, I get an error.
I have a drone file, which just builds a docker image from a Dockerfile and uploads it into a private docker registry.
This Dockerfile looks like this and is there to build a vue js app.
FROM node:latest as build-stage
COPY package*.json ./
COPY .npmrc ./
RUN npm config set strict-ssl false
RUN npm install
COPY ./ .
RUN npm run build
FROM nginx:1.20 as production-stage
RUN mkdir /app
COPY --from=build-stage /app/dist /app
COPY nginx.conf /etc/nginx/nginx.conf
CMD [“nginx”, “-g”, “daemon off;”]
The problem now is that I need to use a custom npm registry to pull the node packages from.
(thats why i use the .npmrc file)
But the donr ci pipeline fails with this message
This is my drone pipeline:
name: deploy new view version
- name: build frontend
I seached everywhere for an answer, but the only thing I always read is: “set up a proxy”, but I have no idea to what value I need to set the proxy.