Fix: Correct COPY command syntax in frontend production Dockerfile#2086
Open
trillium wants to merge 2 commits intodevelopmentfrom
Open
Fix: Correct COPY command syntax in frontend production Dockerfile#2086trillium wants to merge 2 commits intodevelopmentfrom
trillium wants to merge 2 commits intodevelopmentfrom
Conversation
Fixed two build errors preventing the frontend Docker image from building: 1. Removed duplicate 'display' key in loadingStyle object (ManageProjects.jsx) - The loadingStyle object had both "display": "none" and "display": "flex" - Kept "display": "flex" which is correct for the loading overlay - Introduced in commit 3a25f7f by JamesNg on 2025-01-29 2. Replaced non-existent StyledButton import with MUI Button (buttonGroup.jsx) - Component was importing StyledButton from ProjectForm.jsx - StyledButton export was removed in commit 8e9ac7b by Kaipher on 2025-10-06 - Component was created in commit cf194d2 by JamesNg on 2025-09-29 - Updated to use standard MUI Button component with matching styles Build errors resolved: - "Duplicate key 'display' in object literal" - "StyledButton is not exported by src/components/ProjectForm.jsx" 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>
fba1e9c to
02e783c
Compare
trillium
added a commit
that referenced
this pull request
Feb 15, 2026
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>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
client/Dockerfile.prodthat was causing frontend Docker build failuresCOPY --chown=node:node package.json package.json ./toCOPY --chown=node:node package*.json ./Problem
The "Frontend Build and Deploy" GitHub Action was failing on 2026-02-12 with exit code 1 during the "Build, tag, and push the image to Amazon ECR" step. The issue was caused by an invalid COPY command on line 6 of the Dockerfile that attempted to copy
package.jsontwice.Solution
Updated the COPY command to use the
package*.jsonglob pattern, which:package.jsonpackage-lock.jsonif presentbackend/Dockerfile.prod:5)Changes
client/Dockerfile.prod:6- Fixed COPY command syntaxTest Plan
References
🤖 Generated with Claude Code