From 237704fef8bff2d10a1a275ba7c5fa0f74d28761 Mon Sep 17 00:00:00 2001 From: Color2333 <1552429809@qq.com> Date: Sat, 10 Oct 2026 12:37:31 +0800 Subject: [PATCH] =?UTF-8?q?ops(deploy):=20=E6=9E=84=E5=BB=BA=E5=89=8D?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=20prune=EF=BC=88builder=20cache=20+=20?= =?UTF-8?q?=E6=82=AC=E7=A9=BA=E9=95=9C=E5=83=8F=EF=BC=89=E2=80=94=E2=80=94?= =?UTF-8?q?40G=20=E7=9B=98=E4=B8=89=E6=AC=A1=E6=89=93=E6=BB=A1=E5=AE=9E?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/auto_deploy.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/auto_deploy.sh b/scripts/auto_deploy.sh index 51d0f41..0ec1935 100755 --- a/scripts/auto_deploy.sh +++ b/scripts/auto_deploy.sh @@ -85,6 +85,11 @@ rsync -a --delete \ log "代码已更新" # 6. 重建 + 重启 +# 构建前自动清理:build cache + 悬空镜像(40G 盘三次 100% 打满实证) +docker builder prune -f >/dev/null 2>&1 || true +docker image prune -f >/dev/null 2>&1 || true +log "构建前 prune 完成" + log "docker compose build..." if ! docker compose build 2>&1 | tee -a "$LOG_FILE" | tail -5; then log "FAIL: 构建失败,保留旧 SHA (下次重试)"