forked from Gitlink/gitlink_help_center
fix: add cache clearing and cache-busting to Dockerfile
- Add explicit cache clearing for .docusaurus and build directories - Add build arguments (BUILD_DATE, BUILD_VERSION) to force Docker layer cache invalidation - This ensures clean builds without cached artifacts from previous builds - Should resolve persistent ProgressPanel component errors
This commit is contained in:
parent
7d86c161aa
commit
10f888aed5
|
|
@ -19,7 +19,14 @@ COPY package.json package-lock.json ./
|
|||
# 安装依赖(忽略peer依赖冲突)
|
||||
RUN npm install --legacy-peer-deps
|
||||
# 复制项目文件
|
||||
# 添加时间戳以破坏缓存
|
||||
ARG BUILD_DATE
|
||||
ARG BUILD_VERSION
|
||||
ENV BUILD_DATE=$BUILD_DATE
|
||||
ENV BUILD_VERSION=$BUILD_VERSION
|
||||
COPY . .
|
||||
# 清理Docusaurus缓存和构建目录
|
||||
RUN rm -rf .docusaurus build
|
||||
# 构建应用
|
||||
RUN npm run build
|
||||
# 暴露端口
|
||||
|
|
|
|||
Loading…
Reference in New Issue