From c028c79b4034d5f9a5e3abe00c5b74f58169bfda Mon Sep 17 00:00:00 2001 From: Sabiha Khan <87858386+chewwbaka@users.noreply.github.com> Date: Wed, 12 Nov 2025 14:18:10 +0530 Subject: [PATCH] fix: arm docker build step (#48) --- ui/Dockerfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ui/Dockerfile b/ui/Dockerfile index be8fda3..afa7d69 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -3,16 +3,24 @@ FROM node:20-alpine AS deps WORKDIR /app +# Install Python and build dependencies for native modules +# This helps with ARM64 builds and native module compilation +RUN apk add --no-cache python3 make g++ libc6-compat + # Copy package files COPY ui/package*.json ./ -# Install all dependencies (including dev dependencies for building) -RUN npm ci --cache /tmp/empty-cache && \ - npm cache clean --force + +# Clean install with proper handling of native modules +RUN rm -rf node_modules && \ + npm ci || npm install # Stage 2: Builder FROM node:20-alpine AS builder WORKDIR /app +# Install libc6-compat for native modules in builder stage too +RUN apk add --no-cache libc6-compat + # Copy dependencies from deps stage COPY --from=deps /app/node_modules ./node_modules