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