perf: use BuildKit cache mount for npm ci
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user