From fe7e01d5fa87a5ccc6e6feb0c5f39bbdc4913074 Mon Sep 17 00:00:00 2001 From: beatz174-bit Date: Sun, 23 Nov 2025 10:42:59 +1000 Subject: [PATCH] Optimize Docker build cache for dependencies --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2ec0691..1fc69e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,14 @@ # Build stage FROM node:20-alpine AS build WORKDIR /app -COPY package.json package-lock.json* tsconfig*.json vite.config.ts ./ +COPY package.json package-lock.json* ./ RUN --mount=type=cache,target=/root/.npm \ --mount=type=cache,target=/app/node_modules \ npm ci --no-audit --no-fund COPY index.html ./ +COPY tsconfig*.json ./ +COPY vite.config.ts ./ COPY src ./src COPY public ./public RUN --mount=type=cache,target=/app/node_modules npm run build