Skip to content

Commit d04e0b5

Browse files
committed
修正路径
1 parent 5256278 commit d04e0b5

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Dockerfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# =================================================================
22
# 第一阶段: 编译前端
33
# =================================================================
4-
FROM node:24.4.1 AS frontend-builder
4+
FROM node:24.4.1-slim AS frontend-builder
55
WORKDIR /app
66
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
7+
COPY front/package*.json front/pnpm-lock.yaml ./
8+
# 路径修正:确保拷贝到正确位置
9+
COPY front/ ./
10+
RUN pnpm install && pnpm run build:docker
1311

1412
# =================================================================
1513
# 第二阶段: 运行环境

0 commit comments

Comments
 (0)