Commit 1c8dd59b authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

ci: npmrc - Dockerfile

parent 797077b3
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
# --------------> 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/