fix(docker): 加 ARG CACHE_BUST 强制每次 commit 重建源码层
Windows BuildKit --cache-from 不能正确失效源码 COPY 层, 通过传入 git SHA 作为 CACHE_BUST 值来强制失效。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
这个提交包含在:
父节点
d127ce785f
当前提交
7b0689c230
@ -24,6 +24,9 @@ RUN --mount=type=cache,target=/root/.m2 \
|
|||||||
mvn -s /workspace/maven-settings.xml -pl ${SERVICE_MODULE} -am \
|
mvn -s /workspace/maven-settings.xml -pl ${SERVICE_MODULE} -am \
|
||||||
dependency:go-offline -q
|
dependency:go-offline -q
|
||||||
|
|
||||||
|
# CACHE_BUST = git SHA,每次 commit 自动失效源码及后续所有层
|
||||||
|
ARG CACHE_BUST=unknown
|
||||||
|
|
||||||
# Copy source — invalidates only the compile layer, not the deps layer
|
# Copy source — invalidates only the compile layer, not the deps layer
|
||||||
COPY common ./common
|
COPY common ./common
|
||||||
COPY im-sdk ./im-sdk
|
COPY im-sdk ./im-sdk
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户