Skip to content

Commit 5472ffa

Browse files
trilliumclaudehappy-otter
committed
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 <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
1 parent 293c618 commit 5472ffa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/Dockerfile.prod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ RUN mkdir /srv/client && chown node:node /srv/client
33
WORKDIR /srv/client
44
USER node
55
RUN mkdir -p node_modules
6-
COPY --chown=node:node package.json package.json ./
6+
COPY --chown=node:node package*.json ./
77
RUN npm install --no-update-notifier
88

99
FROM node:20-alpine AS client-builder
@@ -12,8 +12,8 @@ WORKDIR /srv/client
1212
COPY --from=node-modules-install /srv/client/node_modules node_modules
1313
COPY . .
1414
USER root
15-
ARG CUSTOM_REQUEST_HEADER nAb3kY-S%qE#4!d
16-
ENV REACT_APP_CUSTOM_REQUEST_HEADER $CUSTOM_REQUEST_HEADER
15+
ARG CUSTOM_REQUEST_HEADER=nAb3kY-S%qE#4!d
16+
ENV REACT_APP_CUSTOM_REQUEST_HEADER=$CUSTOM_REQUEST_HEADER
1717
RUN npm run build
1818

1919
FROM nginx as client-production

0 commit comments

Comments
 (0)