Skip to content

Commit 6e5ffa5

Browse files
committed
🐛 fix: 修复 Docker 安装依赖时缺少 prepare 脚本
1 parent 6dc33e2 commit 6e5ffa5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

deploy/docker/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ WORKDIR /app
2121
# 复制依赖清单、锁文件和 pnpm overrides 配置
2222
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
2323

24+
# pnpm install 会执行 package.json 中的 prepare 脚本
25+
COPY scripts/install-git-hooks.mjs ./scripts/install-git-hooks.mjs
26+
2427
# 安装所有依赖(包括开发依赖,构建时需要)
2528
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
2629
if [ -n "$NPM_REGISTRY" ]; then pnpm config set registry "$NPM_REGISTRY"; fi && \
@@ -72,4 +75,4 @@ RUN chmod +x ./entrypoint.sh
7275
EXPOSE 3000
7376

7477
# 启动应用(包含预热)
75-
CMD ["./entrypoint.sh"]
78+
CMD ["./entrypoint.sh"]

0 commit comments

Comments
 (0)