From 529d065a7562264aa02725be938653e4c554c30e Mon Sep 17 00:00:00 2001 From: Maulana Sodiqin Date: Tue, 25 Nov 2025 10:27:49 +0700 Subject: [PATCH] perf: optimize Docker builds with npm ci MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace npm install with npm ci and optimization flags to fix deployment timeouts: - Use npm ci for faster, more reliable installs - Add --prefer-offline to use cached packages - Add --no-audit and --no-fund to skip unnecessary checks - Optimize landing.Dockerfile to copy package files before installing This resolves the Docker build EOF errors during deployment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- docker/backoffice.Dockerfile | 2 +- docker/dimentorin.Dockerfile | 2 +- docker/gacha.Dockerfile | 2 +- docker/hackathon.Dockerfile | 2 +- docker/landing.Dockerfile | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docker/backoffice.Dockerfile b/docker/backoffice.Dockerfile index ef68f85..6c395ca 100644 --- a/docker/backoffice.Dockerfile +++ b/docker/backoffice.Dockerfile @@ -1,7 +1,7 @@ FROM node:22-alpine AS deps WORKDIR /app COPY package.json package-lock.json ./ -RUN npm install +RUN npm ci --prefer-offline --no-audit --no-fund FROM node:22-alpine AS builder WORKDIR /app diff --git a/docker/dimentorin.Dockerfile b/docker/dimentorin.Dockerfile index 7c832d3..30bb46d 100644 --- a/docker/dimentorin.Dockerfile +++ b/docker/dimentorin.Dockerfile @@ -1,7 +1,7 @@ FROM node:22-alpine AS deps WORKDIR /app COPY package.json package-lock.json ./ -RUN npm install +RUN npm ci --prefer-offline --no-audit --no-fund FROM node:22-alpine AS builder WORKDIR /app diff --git a/docker/gacha.Dockerfile b/docker/gacha.Dockerfile index 0531586..86123e6 100644 --- a/docker/gacha.Dockerfile +++ b/docker/gacha.Dockerfile @@ -1,7 +1,7 @@ FROM node:22-alpine AS deps WORKDIR /app COPY package.json package-lock.json ./ -RUN npm install +RUN npm ci --prefer-offline --no-audit --no-fund FROM node:22-alpine AS builder WORKDIR /app diff --git a/docker/hackathon.Dockerfile b/docker/hackathon.Dockerfile index f7e1298..633c81b 100644 --- a/docker/hackathon.Dockerfile +++ b/docker/hackathon.Dockerfile @@ -1,7 +1,7 @@ FROM node:22-alpine AS deps WORKDIR /app COPY package.json package-lock.json ./ -RUN npm install +RUN npm ci --prefer-offline --no-audit --no-fund FROM node:22-alpine AS builder WORKDIR /app diff --git a/docker/landing.Dockerfile b/docker/landing.Dockerfile index 462c476..05edd4a 100644 --- a/docker/landing.Dockerfile +++ b/docker/landing.Dockerfile @@ -1,8 +1,9 @@ FROM node:22-alpine AS builder WORKDIR /app +COPY package.json package-lock.json ./ +RUN npm ci --prefer-offline --no-audit --no-fund COPY . . -RUN npm install RUN npm run landing:build FROM node:22-alpine AS runner