Fix Dockerfile: Use npm ci and package-lock for stable builds

This commit is contained in:
cawcenter
2025-12-12 19:24:13 -05:00
parent 2764883a25
commit 77cedd8b00

View File

@@ -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