fix: switch from Alpine to Debian slim Node.js image to resolve SWC binary loading issue

- Changed FROM node:20-alpine to node:20-slim for both builder and runner stages
- Alpine (musl) is incompatible with Next.js SWC binary (glibc)
- Debian slim provides 80% smaller image compared to full node:20 (~180MB vs ~900MB)
- Fully compatible with Next.js and SWC without any patches
- Better performance and stability on Synology NAS
This commit is contained in:
XPS\Micro 2026-01-31 12:39:31 +01:00
parent 912904802c
commit 29145dde84

View File

@ -1,5 +1,5 @@
# Build stage
FROM node:20-alpine AS builder
FROM node:20-slim AS builder
WORKDIR /app
@ -15,7 +15,7 @@ ENV NEXT_TELEMETRY_DISABLED=1
RUN npm run build
# Production stage
FROM node:20-alpine AS runner
FROM node:20-slim AS runner
WORKDIR /app