Fix Docker build: upgrade to node:22-alpine, install only server deps

The production stage was running npm ci --omit=dev against a macOS-
generated lockfile on linux/alpine, which caused exit code 1. Switch
to installing only the three packages the server actually needs
(express, cors, docx) so the lockfile is irrelevant in that stage.
Also upgrades to node:22-alpine (current LTS) to clear the Node 20
deprecation warning on GitHub Actions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-07-21 09:04:39 -04:00
1 parent 96c4b541f9
commit daa7eb1a0d
1 file changed
+3 -4
+3 -4
View File
@@ -1,14 +1,13 @@
FROM node:20-alpine AS build FROM node:22-alpine AS build
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm ci RUN npm ci
COPY . . COPY . .
RUN npm run build RUN npm run build
FROM node:20-alpine FROM node:22-alpine
WORKDIR /app WORKDIR /app
COPY package*.json ./ RUN npm install express cors docx
RUN npm ci --omit=dev
COPY server.js ./ COPY server.js ./
COPY --from=build /app/build ./build COPY --from=build /app/build ./build