From 9e4bc6e7fc4892c207d863ec0f39835f12dad3b4 Mon Sep 17 00:00:00 2001 From: Yusuke Kuoka Date: Sat, 9 May 2020 14:31:52 +0900 Subject: [PATCH] chore: Add retries for downloading kubectl in docker builds --- Dockerfile | 2 +- Dockerfile.helm3 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 78fc930f..17527eac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ RUN wget ${HELM_LOCATION}/${HELM_FILENAME} && \ # we should be able to install using apk add. ENV KUBECTL_VERSION="v1.14.5" ENV KUBECTL_SHA256="26681319de56820a8467c9407e9203d5b15fb010ffc75ac5b99c9945ad0bd28c" -RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \ +RUN curl --retry 3 -LO "https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \ sha256sum kubectl | grep ${KUBECTL_SHA256} && \ chmod +x kubectl && \ mv kubectl /usr/local/bin/kubectl diff --git a/Dockerfile.helm3 b/Dockerfile.helm3 index 2cef4396..22ac75a7 100644 --- a/Dockerfile.helm3 +++ b/Dockerfile.helm3 @@ -27,7 +27,7 @@ RUN wget ${HELM_LOCATION}/${HELM_FILENAME} && \ # we should be able to install using apk add. ENV KUBECTL_VERSION="v1.14.5" ENV KUBECTL_SHA256="26681319de56820a8467c9407e9203d5b15fb010ffc75ac5b99c9945ad0bd28c" -RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \ +RUN curl --retry 3 -LO "https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \ sha256sum kubectl | grep ${KUBECTL_SHA256} && \ chmod +x kubectl && \ mv kubectl /usr/local/bin/kubectl