hts/apps/blogai/Dockerfile

24 lines
479 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.12.2-bullseye-slim AS dev
# 设置环境变量development保证 devDependencies 被安装)
ENV NODE_ENV=development
# 安装 pnpm属主机使用的是 9.5.0
RUN npm install -g pnpm@9.5.0
# 创建工作目录
WORKDIR /app
# 拷贝所有源码
COPY . .
# 安装依赖(含 devDependencies
RUN pnpm install
# 设置默认进入 blogai 子目录
WORKDIR /app/apps/blogai
# 设置默认 shell
CMD ["/bin/bash"]