Try making arm64 image
Some checks failed
Build & Push Docker Image / build (push) Failing after 1m9s

This commit is contained in:
2026-02-27 14:42:40 +01:00
parent 0d48f52d3b
commit ef5790b44d
2 changed files with 17 additions and 3 deletions

View File

@@ -3,6 +3,9 @@ FROM node:20-alpine AS builder
WORKDIR /app
# Install build tools needed for native modules and frontend build
RUN apk add --no-cache python3 build-base sqlite-dev
COPY package.json package-lock.json* ./
RUN npm ci
@@ -12,8 +15,12 @@ RUN npm run build
# ── Stage 2: Production image ───────────────────────────────────────────────
FROM node:20-alpine
# better-sqlite3 needs build tools for native compilation
RUN apk add --no-cache python3 make g++
# Allow forcing build from source (useful when prebuilt binaries are not available)
ARG BUILD_FROM_SOURCE=false
ENV npm_config_build_from_source=${BUILD_FROM_SOURCE}
# Install build tools and sqlite dev headers for compiling native modules
RUN apk add --no-cache python3 build-base sqlite-dev
WORKDIR /app
@@ -21,7 +28,7 @@ COPY package.json package-lock.json* ./
RUN npm ci --omit=dev && npm cache clean --force
# Remove build tools after install to keep image smaller
RUN apk del python3 make g++
RUN apk del build-base python3
# Copy server code
COPY server/ ./server/