Skip to content
Snippets Groups Projects
Commit 1c8dd59b authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

ci: npmrc - Dockerfile

parent 797077b3
No related branches found
No related tags found
No related merge requests found
# --------------> The builder image
# The builder image
FROM node:23.6.0 AS builder
ENV NODE_ENV=production
WORKDIR /app
ARG NPM_TOKEN
COPY package*.json ./
RUN echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc && \
npm ci --omit=dev && \
rm -f .npmrc
RUN --mount=type=secret,id=npmrc,target=/home/node/.npmrc \
npm ci --omit=dev
COPY . .
RUN npm run build
# --------------> The production image
# The production image
FROM nginxinc/nginx-unprivileged:1.27.3 AS production
COPY --from=builder /app/build/ /usr/share/nginx/html/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment