diff --git a/dockerfile b/dockerfile index 21795a0..252f220 100644 --- a/dockerfile +++ b/dockerfile @@ -1,10 +1,17 @@ -# Dockerfile.simple -FROM node:20-alpine +# 使用官方Node.js镜像 +FROM node:22-alpine -WORKDIR /dist +# 设置工作目录 +WORKDIR /build +# 复制整个项目(包括 packages 目录) COPY . . -RUN npm install && npm run build + +# 安装所有依赖(包括 workspace 依赖) +RUN npm install -g pnpm && pnpm install + +# 构建生产版本 +RUN pnpm run build # 挂载点提示 CMD ["echo", "Dist files are ready in /build/dist"] \ No newline at end of file