From b5972d34cf96a55c27b9629cc1a3713991670f45 Mon Sep 17 00:00:00 2001 From: continuist Date: Sun, 21 Sep 2025 13:10:52 -0400 Subject: [PATCH] Remove unnecessary files during frontend build --- frontend/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index bce53e2..2c1cce7 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /app # install deps (needs dev deps for build) COPY package*.json ./ -RUN npm ci +RUN npm ci && npm cache clean --force # app source COPY . . @@ -19,6 +19,8 @@ ENV NEXT_PUBLIC_API_HOST=${NEXT_PUBLIC_API_HOST} ENV NEXT_PUBLIC_API_PORT=${NEXT_PUBLIC_API_PORT} RUN npm run build +# Clean up unnecessary files to save space after build +RUN rm -rf node_modules .next/cache # ---------- runner (standalone) ---------- FROM docker.io/node:20-alpine AS runner