完成a6000测试系统构建、部署、测试整合 #35
@ -151,6 +151,12 @@ pull_base_image() {
|
|||||||
local attempts=${2:-3}
|
local attempts=${2:-3}
|
||||||
local delay=${3:-5}
|
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
|
for ((i=1; i<=attempts; i++)); do
|
||||||
echo " Pulling base image ($i/$attempts): $image_ref"
|
echo " Pulling base image ($i/$attempts): $image_ref"
|
||||||
if docker pull "$image_ref" >/dev/null; then
|
if docker pull "$image_ref" >/dev/null; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user