From: Kane York Date: Tue, 26 May 2020 01:14:12 +0000 (-0700) Subject: FIX: Automatically retry image pull once (#468) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a554d3dcbe96ef0a2b8e08a539fdb77daf3a0b24;p=discourse_docker.git FIX: Automatically retry image pull once (#468) --- 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