feat: 构建更新
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
# 在 Linux 内安装依赖和生成 Prisma 客户端,不能复用开发机的 node_modules。
|
||||
FROM node:24.20.0-bookworm-slim AS base
|
||||
# 按构建网络选择 npm 源;不修改开发机配置,也不改变锁定依赖版本。
|
||||
ARG NPM_REGISTRY=https://registry.npmjs.org
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates openssl \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& npm install --global pnpm@11.24.0
|
||||
&& npm install --global pnpm@11.24.0 --registry="${NPM_REGISTRY}"
|
||||
WORKDIR /app
|
||||
|
||||
FROM base AS build
|
||||
COPY . .
|
||||
RUN pnpm install --frozen-lockfile --filter @doodle/server...
|
||||
RUN pnpm install --frozen-lockfile --filter @doodle/server... --registry="${NPM_REGISTRY}"
|
||||
RUN pnpm --filter @doodle/server... run build
|
||||
|
||||
FROM base AS runtime
|
||||
|
||||
Reference in New Issue
Block a user