Skip to content

Commit

Permalink
Addretries to the curl command
Browse files Browse the repository at this point in the history
Look like the `--retry` argument is not always affective.

Closes elastic#40531
  • Loading branch information
alpar-t committed Oct 28, 2019
1 parent b89bf9d commit df516ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions distribution/docker/src/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ FROM centos:7 AS builder
ENV PATH /usr/share/elasticsearch/bin:$PATH
ENV JAVA_HOME /opt/jdk-${jdkVersion}

RUN curl -L --retry 8 -s -S ${jdkUrl} --continue-at - --output /tmp/jdk.tar.gz && \
tar -C /opt -zxf /tmp/jdk.tar.gz && \
rm -Rf /tmp/jdk.tar.gz
RUN for iter in {1..10}; do curl -L -s -S ${jdkUrl} | tar -C /opt -zx &&\
exit_code=0 && break || exit_code=\$? && echo "download error: retry \$iter in 10s" && sleep 10; done;


# Replace OpenJDK's built-in CA certificate keystore with the one from the OS
# vendor. The latter is superior in several ways.
Expand Down

0 comments on commit df516ae

Please sign in to comment.