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