skip to Main Content

Docker – Dokcer build image –secret in Jenkins Pipeline

Here is my dockerfile FROM node:20-alpine3.18 WORKDIR /app COPY package*.json .npmrc ./ RUN --mount=type=secret,id=npmrc NPM_TOKEN=$(cat /run/secrets/npmrc) npm ci --production COPY . . EXPOSE 8000 CMD ["npm", "run", "start"] Here is my Jenkinsfile and docker-compose jenkins: container_name: jenkins image: jenkins/jenkins:lts privileged:…

VIEW QUESTION
Back To Top
Search