fix: arm docker build step (#48)

This commit is contained in:
Sabiha Khan 2025-11-12 14:18:10 +05:30 committed by GitHub
parent dc6d696af6
commit c028c79b40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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