ci: 🚀 Optimize the docker file to use the build cache

This commit is contained in:
Manjusaka
2022-09-11 16:10:25 +08:00
parent cfe5dda80b
commit 11f1b22d6f
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ FROM node:16-alpine as builder
WORKDIR /app
RUN apk add g++ make python3 git libpng-dev && npm i -g pnpm@7
COPY . .
RUN pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build:keck
RUN --mount=type=cache,target=/app/node_modules,rw,sharing=private pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build:keck
FROM node:16-alpine as node_modules
WORKDIR /app