fix: make .next/cache writable in Docker container
All checks were successful
Build & Push / build-and-push (push) Successful in 1m55s

The nextjs user couldn't write to .next/cache at runtime because
the directory was created by root during the build stage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 18:59:35 +01:00
parent ff3c1594fa
commit d971c5905f

View File

@@ -42,6 +42,9 @@ COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
# Ensure .next/cache is writable by the nextjs user
RUN mkdir -p .next/cache && chown -R nextjs:nodejs .next
USER nextjs
EXPOSE 3000