更新 Dockerfile: 在构建前删除 dist 目录以确保不使用本地遗留产物,优化构建过程。

This commit is contained in:
2025-07-19 19:42:56 +08:00
parent 56438a0425
commit 4ffae321ef
4 changed files with 2 additions and 352 deletions

View File

@ -23,7 +23,8 @@ WORKDIR /app
# 复制前端代码并安装依赖、构建
COPY platform/ ./platform/
WORKDIR /app/platform
RUN npm install && npm run build
# 构建前先删除 dist确保不会用到本地遗留产物
RUN rm -rf dist && npm install && npm run build
RUN ls -l /app/platform
# 安装 http-server