编辑文件 cache.dockerfile

This commit is contained in:
cnb.aUOqoEV4wEA 2025-11-12 22:02:45 +08:00 committed by cnb
parent 503747b001
commit 87e4b8a99b
No known key found for this signature in database
GPG Key ID: 074E9EA8B7D5A8A3

View File

@ -6,14 +6,18 @@ ENV PATH="$PNPM_HOME:$PATH"
ENV NODE_OPTIONS=--max-old-space-size=8192
ENV TZ=Asia/Shanghai
RUN npm i -g corepack
ENV NODE_PATH=/app/node_modules
# 设置工作目录
WORKDIR /app
# copy package.json and pnpm-lock.yaml to workspace
COPY . /app
# 将 by 中的文件列表 COPY 过来
COPY . .
RUN npm ci
RUN npm i -g corepack
# 安装依赖
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN echo "Builder Success 🎉"