Skip to content

Commit 609c7ed

Browse files
committed
feat: 更新Dockerfile以优化依赖安装和构建过程
1 parent 2cfa38a commit 609c7ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
FROM node:20-slim AS base
22
ENV PNPM_HOME="/pnpm"
33
ENV PATH="$PNPM_HOME:$PATH"
4-
RUN corepack enable
4+
RUN corepack disable && npm install -g pnpm@latest
55

66
FROM base AS build
77
COPY . /usr/src/app
88
WORKDIR /usr/src/app
9-
RUN pnpm fetch --prod
9+
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
1010
RUN pnpm run build:local
1111
RUN pnpm deploy --filter @chatgpt-telegram-workers/local --prod /prod/local
1212

0 commit comments

Comments
 (0)