From a554d3dcbe96ef0a2b8e08a539fdb77daf3a0b24 Mon Sep 17 00:00:00 2001 From: Kane York Date: Mon, 25 May 2020 18:14:12 -0700 Subject: [PATCH] FIX: Automatically retry image pull once (#468) --- launcher | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/launcher b/launcher index 96b8869..2a61c2f 100755 --- a/launcher +++ b/launcher @@ -144,6 +144,11 @@ install_docker() { exit 1 } +pull_image() { + # Add a single retry to work around dockerhub TLS errors + $docker_path pull $image || $docker_path pull image +} + check_prereqs() { if [ -z $docker_path ]; then @@ -196,6 +201,8 @@ check_prereqs() { echo echo "Please be patient" echo + + pull_image fi # 5. running recommended git version @@ -657,7 +664,7 @@ run_bootstrap() { # Is the image available? # If not, pull it here so the user is aware what's happening. - $docker_path history $image >/dev/null 2>&1 || $docker_path pull $image + $docker_path history $image >/dev/null 2>&1 || pull_image set_template_info -- 2.25.1