From 5472ffaf129f6089be5bf89ceccbf58c595d7526 Mon Sep 17 00:00:00 2001 From: Trillium Smith Date: Sat, 14 Feb 2026 22:07:03 -0800 Subject: [PATCH] Fix: Correct Dockerfile syntax errors in production build Fixed two syntax errors in the frontend production Dockerfile that were masked by earlier build failures: 1. Line 6: COPY command syntax error - Changed: COPY --chown=node:node package.json package.json ./ - To: COPY --chown=node:node package*.json ./ - The original attempted to copy package.json twice (invalid syntax) - Now uses glob pattern to properly copy package.json and package-lock.json if present - Matches the pattern used in backend/Dockerfile.prod:5 2. Lines 15-16: Missing equals signs in ARG and ENV directives - Changed: ARG CUSTOM_REQUEST_HEADER nAb3kY-S%qE#4!d - To: ARG CUSTOM_REQUEST_HEADER=nAb3kY-S%qE#4!d - Changed: ENV REACT_APP_CUSTOM_REQUEST_HEADER $CUSTOM_REQUEST_HEADER - To: ENV REACT_APP_CUSTOM_REQUEST_HEADER=$CUSTOM_REQUEST_HEADER - Ensures proper Dockerfile syntax compliance These errors were present in the original file but were not caught because the build was failing earlier due to code issues (duplicate object keys and missing exports) that have been fixed in PR #2086. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- client/Dockerfile.prod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/Dockerfile.prod b/client/Dockerfile.prod index 6b774e866..bcd153121 100644 --- a/client/Dockerfile.prod +++ b/client/Dockerfile.prod @@ -3,7 +3,7 @@ RUN mkdir /srv/client && chown node:node /srv/client WORKDIR /srv/client USER node RUN mkdir -p node_modules -COPY --chown=node:node package.json package.json ./ +COPY --chown=node:node package*.json ./ RUN npm install --no-update-notifier FROM node:20-alpine AS client-builder @@ -12,8 +12,8 @@ WORKDIR /srv/client COPY --from=node-modules-install /srv/client/node_modules node_modules COPY . . USER root -ARG CUSTOM_REQUEST_HEADER nAb3kY-S%qE#4!d -ENV REACT_APP_CUSTOM_REQUEST_HEADER $CUSTOM_REQUEST_HEADER +ARG CUSTOM_REQUEST_HEADER=nAb3kY-S%qE#4!d +ENV REACT_APP_CUSTOM_REQUEST_HEADER=$CUSTOM_REQUEST_HEADER RUN npm run build FROM nginx as client-production