Dockerfile: --ignore-scripts vid npm ci — better-sqlite3 har binding.gyp utan install-script så npm auto-kör node-gyp (python saknas i trixie-slim); bundlade prebuilden används ändå alltid av laddaren och funkar på trixie. Verifierad med arm64-qemu-smoketest.
All checks were successful
build-and-push / build (push) Successful in 21s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01824ZrvG2mDYYrmwqypLNup
This commit is contained in:
2026-08-01 02:33:05 +02:00
parent ac93b25827
commit 3ae0289f44

View File

@@ -14,7 +14,10 @@ RUN npm run build
FROM node:22-trixie-slim AS backend
WORKDIR /app
COPY backend/package.json backend/package-lock.json ./
RUN npm ci --omit=dev --no-audit --no-fund
# --ignore-scripts: better-sqlite3 saknar install-script men har binding.gyp,
# så npm auto-kör node-gyp (kräver python). Onödigt — laddaren föredrar ändå
# den bundlade prebuilden, som funkar på trixie (glibc 2.41 >= 2.38).
RUN npm ci --omit=dev --no-audit --no-fund --ignore-scripts
COPY backend/src ./src
FROM node:22-trixie-slim