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 ========= # ========= BASE =========
FROM node:20-alpine AS base FROM node:20-alpine AS base
WORKDIR /app 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 ========= # ========= DEPENDENCIES =========
FROM base AS deps FROM base AS deps
COPY package.json ./ COPY package*.json ./
RUN npm install RUN npm ci
# ========= BUILD ========= # ========= BUILD =========
FROM base AS builder FROM base AS builder