From 1d4208ed3c89348acd45a997c848ff6e07700455 Mon Sep 17 00:00:00 2001 From: yuyr Date: Thu, 23 Oct 2025 14:43:45 +0800 Subject: [PATCH] =?UTF-8?q?[#29]=E5=B7=B2=E7=BB=8F=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=9A=84=E9=95=9C=E5=83=8F=E5=B0=B1=E4=B8=8D=E5=86=8D=E6=8B=89?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/build_images.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/build_images.sh b/build/build_images.sh index b4a023c..d56b79e 100755 --- a/build/build_images.sh +++ b/build/build_images.sh @@ -151,6 +151,12 @@ pull_base_image() { local attempts=${2:-3} local delay=${3:-5} + # If the image already exists locally, skip pulling. + if docker image inspect "$image_ref" >/dev/null 2>&1; then + echo " Local image present; skip pull: $image_ref" + return 0 + fi + for ((i=1; i<=attempts; i++)); do echo " Pulling base image ($i/$attempts): $image_ref" if docker pull "$image_ref" >/dev/null; then