From 68845057a25a7e61d6d7024bb7e299d89b0aa6ec Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Fri, 29 Nov 2019 09:50:26 +1100 Subject: [PATCH] Retry curl up to 3 times for transient network errors Signed-off-by: Amir Zarrinkafsh --- cmd/authelia-scripts/docker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/authelia-scripts/docker.go b/cmd/authelia-scripts/docker.go index a75f3deec..f04e08f19 100644 --- a/cmd/authelia-scripts/docker.go +++ b/cmd/authelia-scripts/docker.go @@ -52,10 +52,10 @@ func (d *Docker) Manifest(tag, amd64tag, arm32v7tag, arm64v8tag string) error { // CleanTag remove a tag from dockerhub. func (d *Docker) CleanTag(tag string) error { - return utils.CommandWithStdout("bash", "-c", "curl -s -o /dev/null -u $DOCKER_USERNAME:$DOCKER_PASSWORD -X DELETE https://cloud.docker.com/v2/repositories/"+DockerImageName+"/tags/"+tag+"/").Run() + return utils.CommandWithStdout("bash", "-c", "curl -fs --retry 3 -o /dev/null -u $DOCKER_USERNAME:$DOCKER_PASSWORD -X DELETE https://cloud.docker.com/v2/repositories/"+DockerImageName+"/tags/"+tag+"/").Run() } // PublishReadme push README.md to dockerhub. func (d *Docker) PublishReadme() error { - return utils.CommandWithStdout("bash", "-c", `jq -n --arg msg "$(