hts/apps/blogai/Dockerfile

21 lines
474 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM node:20-bullseye
WORKDIR /app
# ✅ 拷贝整个 mono 项目
COPY . .
# ✅ 宿主上使用的是 pnpm容器中也要全局安装
RUN corepack enable && corepack prepare pnpm@8.15.6 --activate
# ✅ 安装依赖
RUN pnpm install
# ✅ 显式设置 dev 环境Next.js 报 warn 就是因为这个不一致)
ENV NODE_ENV=development
# ✅ 编译验证(替换为你要的项目路径)
WORKDIR /app/apps/blogai
RUN pnpm exec tsc --noEmit
RUN pnpm run build