fix(docker): resolve exit code 1 OOM in nextjs build by limiting workers and memory, ignoring eslint

This commit is contained in:
Michael committed 2026-02-21 11:44:43 +01:00
1 parent d855bda5cd
commit cc40133ad1
3 files changed
+72 -1

No files matched your search

+4 -1
View File
@@ -1,4 +1,4 @@
FROM node:18-alpine AS base
FROM node:20-alpine AS base
# Install dependencies only when needed
FROM base AS deps
@@ -18,6 +18,9 @@ COPY . .
# Next.js telemetry is disabled
ENV NEXT_TELEMETRY_DISABLED=1
# Limit workers and increase memory to prevent OOM
ENV NODE_OPTIONS="--max-old-space-size=4096"
ENV NEXT_PRIVATE_WORKER_THREADS=0
RUN npm run build