From cd126135ef7e36c78217c0eb173c5d12025039cd Mon Sep 17 00:00:00 2001 From: Cosmo Date: Thu, 16 Apr 2026 07:50:47 +0000 Subject: [PATCH] perf: use BuildKit cache mount for npm ci --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ecb3681..3a00749 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,14 @@ +# syntax=docker/dockerfile:1 FROM node:20-alpine AS builder WORKDIR /app COPY package*.json ./ -RUN npm install +RUN --mount=type=cache,target=/root/.npm \ + npm ci --prefer-offline COPY . . ENV NEXTAUTH_SECRET=digital-home-jwt-secret-2026-cosmo ENV NEXTAUTH_URL=https://home.digital-home.site -RUN npm run build +RUN --mount=type=cache,target=/root/.npm \ + npm run build FROM node:20-alpine AS runner WORKDIR /app