Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docker/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ WORKDIR /app
# Copy package files
COPY package.json package-lock.json ./

# Install dependencies
RUN npm ci
# Install dependencies - use npm install instead of npm ci to handle optional deps better
# and explicitly install rollup ARM64 Alpine binary if needed
RUN npm install && \
if [ "$(uname -m)" = "aarch64" ]; then \
npm install --no-save @rollup/rollup-linux-arm64-musl || true; \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Silent failure masks ARM64 binary installation errors

Medium Severity

The || true at the end of the npm install @rollup/rollup-linux-arm64-musl command silently suppresses all errors, including legitimate failures like network issues or version incompatibilities. When running on ARM64 architecture, if this installation fails for a real reason, the Docker build succeeds but the container will fail at runtime when Vite/Rollup tries to use the missing native binary. This creates a confusing failure mode where builds appear successful but containers are broken.

Fix in Cursor Fix in Web

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing version causes rollup native binary mismatch

High Severity

The @rollup/rollup-linux-arm64-musl package is installed without a version constraint, which means the latest version (e.g., 4.56.0) gets installed regardless of which rollup version npm install resolves. The native binary package version must exactly match the main rollup package version. If rollup 4.53.3 is installed but the native binary is 4.56.0, Vite will fail at runtime with module compatibility errors on ARM64 Alpine.

Fix in Cursor Fix in Web

fi

# Copy application code
COPY . .
Expand Down