Copy .npmrc to Docker image during build
Some checks failed
Build and Publish Docker Image / build_and_push (push) Failing after 21s

This commit is contained in:
2024-09-18 16:42:32 +00:00
parent 8d6782c90a
commit f9f4860b14

View File

@@ -13,7 +13,7 @@ WORKDIR /app
FROM base AS build FROM base AS build
# Create app directory and copy the app # Create app directory and copy the app
COPY package*.json tsconfig.json ./ COPY package*.json tsconfig.json .npmrc ./
# Install # Install
RUN npm install RUN npm install
@@ -28,7 +28,7 @@ RUN npm run build
FROM node:lts-alpine FROM node:lts-alpine
# Install dependencies but skip dev dependencies # Install dependencies but skip dev dependencies
COPY --from=build /app/package*.json ./ COPY --from=build /app/package*.json /app/.npmrc ./
RUN npm install --only=production RUN npm install --only=production
# Copy the app # Copy the app