1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-10-28 19:06:10 +08:00

build(docker): 容器内用 scripts/ci 安装依赖并跳过 lifecycle

避免镜像构建阶段执行 fairy postinstall;修正 RUN 命令格式。
This commit is contained in:
chufan
2026-10-09 16:52:03 +08:00
parent e930a65c21
commit d6c9c79f5c

View File

@@ -17,12 +17,13 @@ WORKDIR /apps
COPY . . COPY . .
## 基于容器自动构建 ## 基于容器自动构建
RUN --mount=type=cache,id=pnpm,target=/pnpm/store sh ./scripts/ci && if [ "$NEED_PROXY" = "false" ]; \ RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
then \ sh ./scripts/ci --ignore-scripts && \
pnpm build; \ if [ "$NEED_PROXY" = "false" ]; then \
pnpm build; \
else \ else \
pnpm build:proxy; \ pnpm build:proxy; \
fi; fi
FROM --platform=linux/amd64 registry.cn-hangzhou.aliyuncs.com/142vip-infra/nginx:1.29.0-alpine FROM --platform=linux/amd64 registry.cn-hangzhou.aliyuncs.com/142vip-infra/nginx:1.29.0-alpine