CI: Enable BuildKit cache mounts for faster npm installs
- Add syntax directive for BuildKit cache-mount support - Cache /root/.npm between builds (web + server npm install) - Enable DOCKER_BUILDKIT=1 in CI build step - Remove aggressive builder prune that killed layer cache after each build Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
38fb648e15
commit
bf5b995d7c
2 changed files with 5 additions and 5 deletions
|
|
@ -1,7 +1,9 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM node:24-slim AS web-build
|
||||
WORKDIR /app/web
|
||||
COPY web/package*.json ./
|
||||
RUN npm install --no-audit --no-fund
|
||||
RUN --mount=type=cache,target=/root/.npm npm install --no-audit --no-fund
|
||||
COPY web/ .
|
||||
ARG VITE_BUILD_CHANNEL=stable
|
||||
ARG VITE_APP_VERSION=dev
|
||||
|
|
@ -13,7 +15,7 @@ FROM node:24-slim AS server-deps
|
|||
WORKDIR /app/server
|
||||
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
|
||||
COPY server/package*.json ./
|
||||
RUN npm install --no-audit --no-fund
|
||||
RUN --mount=type=cache,target=/root/.npm npm install --no-audit --no-fund
|
||||
|
||||
FROM server-deps AS server-build
|
||||
COPY server/ .
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue