From ebcd0831f572984a6026b7e04f0e35f97be22d94 Mon Sep 17 00:00:00 2001 From: Anoyi <545544032@qq.com> Date: Fri, 10 May 2024 17:47:31 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20build(docker):=20fix=20OOM=20whe?= =?UTF-8?q?n=20building=20docker=20image=20(#2447)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix: OOM when docker build --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 545ef1dbad8f..91e08f1b65f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,8 +44,11 @@ ENV NEXT_PUBLIC_ANALYTICS_UMAMI "" ENV NEXT_PUBLIC_UMAMI_SCRIPT_URL "" ENV NEXT_PUBLIC_UMAMI_WEBSITE_ID "" +# Node +ENV NODE_OPTIONS "--max-old-space-size=8192" -RUN npm run build:docker # run build standalone for docker version +# run build standalone for docker version +RUN npm run build:docker ## Production image, copy all the files and run next FROM base AS runner