Skip to content

Comments

Fix: Correct Dockerfile syntax errors in production build#2087

Merged
trillium merged 1 commit intodevelopmentfrom
fix/dockerfile-syntax-errors
Feb 17, 2026
Merged

Fix: Correct Dockerfile syntax errors in production build#2087
trillium merged 1 commit intodevelopmentfrom
fix/dockerfile-syntax-errors

Conversation

@trillium
Copy link
Member

Summary

Fixed two pre-existing syntax errors in the frontend production Dockerfile (client/Dockerfile.prod).

Background

These syntax errors were present in the Dockerfile but were never caught because the build was failing earlier due to code issues (fixed in PR #2086). Once the code issues were resolved, these Dockerfile syntax problems would have prevented the build from succeeding.

Changes

1. Fixed COPY command syntax (Line 6)

Before:

COPY --chown=node:node package.json package.json ./

After:

COPY --chown=node:node package*.json ./

Reason: The original command attempted to copy package.json twice, which is invalid Docker syntax. The corrected version uses a glob pattern to copy package.json and package-lock.json (if present), matching the pattern used in backend/Dockerfile.prod:5.

2. Fixed ARG and ENV directive syntax (Lines 15-16)

Before:

ARG CUSTOM_REQUEST_HEADER nAb3kY-S%qE#4!d
ENV REACT_APP_CUSTOM_REQUEST_HEADER $CUSTOM_REQUEST_HEADER

After:

ARG CUSTOM_REQUEST_HEADER=nAb3kY-S%qE#4!d
ENV REACT_APP_CUSTOM_REQUEST_HEADER=$CUSTOM_REQUEST_HEADER

Reason: Docker ARG and ENV directives require an equals sign between the variable name and value for proper syntax compliance.

Testing

  • Trigger the "Frontend Build and Deploy" workflow to verify Docker build succeeds
  • Verify the Docker image builds without syntax errors
  • Confirm the application runs correctly with the built image

Related

🤖 Generated with Claude Code

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>
Copy link
Member

@geolunalg geolunalg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me

@trillium trillium merged commit ffda4f4 into development Feb 17, 2026
3 of 6 checks passed
@trillium trillium deleted the fix/dockerfile-syntax-errors branch February 17, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants