fix: add libc6-compat to builder stage for SWC binary

The Next.js SWC binary requires libc6-compat on Alpine Linux.
It was only installed in the deps stage but not the builder stage,
causing build failures on fresh (no-cache) Docker builds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-03 08:34:46 -08:00
parent a392f708a7
commit 85c20adb0b
1 changed files with 1 additions and 0 deletions

View File

@ -11,6 +11,7 @@ RUN npm ci --only=production=false
# 阶段2: 构建 # 阶段2: 构建
FROM node:20-alpine AS builder FROM node:20-alpine AS builder
RUN apk add --no-cache libc6-compat
WORKDIR /app WORKDIR /app
# 复制依赖 # 复制依赖