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:
parent
912904802c
commit
29145dde84
|
|
@ -1,5 +1,5 @@
|
||||||
# Build stage
|
# Build stage
|
||||||
FROM node:20-alpine AS builder
|
FROM node:20-slim AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
@ -15,7 +15,7 @@ ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Production stage
|
# Production stage
|
||||||
FROM node:20-alpine AS runner
|
FROM node:20-slim AS runner
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user