We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5256278 commit d04e0b5Copy full SHA for d04e0b5
Dockerfile
@@ -1,15 +1,13 @@
1
# =================================================================
2
# 第一阶段: 编译前端
3
4
-FROM node:24.4.1 AS frontend-builder
+FROM node:24.4.1-slim AS frontend-builder
5
WORKDIR /app
6
RUN npm install -g pnpm
7
-COPY front/package*.json front/pnpm-lock.yaml ./front/
8
-# 注意这里:要进入 front 目录安装
9
-WORKDIR /app/front
10
-RUN pnpm install
11
-COPY front/ .
12
-RUN pnpm run build:docker
+COPY front/package*.json front/pnpm-lock.yaml ./
+# 路径修正:确保拷贝到正确位置
+COPY front/ ./
+RUN pnpm install && pnpm run build:docker
13
14
15
# 第二阶段: 运行环境
0 commit comments