Fix Dockerfile: Use npm ci and package-lock for stable builds
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
# ========= BASE =========
|
||||
FROM node:20-alpine AS base
|
||||
WORKDIR /app
|
||||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
||||
RUN apk add --no-cache libc6-compat
|
||||
|
||||
# ========= DEPENDENCIES =========
|
||||
FROM base AS deps
|
||||
COPY package.json ./
|
||||
RUN npm install
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
# ========= BUILD =========
|
||||
FROM base AS builder
|
||||
|
||||
Reference in New Issue
Block a user