fix: switch to node:20-slim for runner to fix persistent image optimization 400 errors
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 11s
Build & Deploy / 🧪 QA (push) Successful in 1m16s
Build & Deploy / 🏗️ Build (push) Successful in 2m57s
Build & Deploy / 🚀 Deploy (push) Successful in 15s
Build & Deploy / 🧪 Post-Deploy Verification (push) Failing after 58s
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-05-06 16:11:49 +02:00
parent 8b0cd6028b
commit ad3708e29e
2 changed files with 12 additions and 7 deletions

View File

@@ -56,15 +56,16 @@ ENV UV_THREADPOOL_SIZE=3
RUN pnpm build
# Stage 2: Runner
FROM node:20-alpine AS runner
FROM node:20-slim AS runner
WORKDIR /app
# Install dependencies for sharp and health checks
RUN apk add --no-cache libc6-compat curl
# Install curl for health checks and procps
RUN apt-get update && apt-get install -y curl procps && rm -rf /var/lib/apt/lists/*
# Create nextjs user and group
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs && \
RUN groupadd --system --gid 1001 nodejs && \
useradd --system --uid 1001 nextjs && \
mkdir -p .next/cache/images && \
chown -R nextjs:nodejs /app
USER nextjs
@@ -72,11 +73,15 @@ USER nextjs
ENV HOSTNAME="0.0.0.0"
ENV PORT=3000
ENV NODE_ENV=production
ENV NEXT_SHARP_PATH=/app/node_modules/sharp
# Copy standalone output
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
# Copy public and static files into the expected locations
# Copy public and static files - standalone expects them in specific locations
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
# Ensure cache directory is writable for the nextjs user
# (Already handled by chown -R above, but explicit is better)
CMD ["node", "server.js"]

View File

@@ -113,7 +113,7 @@
"prepare": "husky",
"preinstall": "npx only-allow pnpm"
},
"version": "2.3.22-rc.15",
"version": "2.3.22-rc.16",
"pnpm": {
"onlyBuiltDependencies": [
"@parcel/watcher",