refactor(Dockerfile): reorder pnpm install step for better build efficiency

This commit is contained in:
2025-11-15 00:45:08 +08:00
parent ae9ca74dbc
commit 94ff0c13f7

View File

@@ -14,9 +14,6 @@ RUN npm install -g pnpm
# 复制源代码
COPY . .
# 复制完工作空间后,安装并链接所有子包依赖
RUN pnpm -r install
# 设置环境文件(用于根应用的构建)
RUN if [ "$BUILD_MODE" = "flask" ]; then \
cp .env.flask .env; \
@@ -28,6 +25,9 @@ RUN if [ "$BUILD_MODE" = "flask" ]; then \
# 构建 @teres/iframe-bridge
RUN pnpm --filter @teres/iframe-bridge run build
# 复制完工作空间后,安装并链接所有子包依赖
RUN pnpm -r install
# 构建根 Vite 应用
RUN pnpm --filter ./ run build