On the 6.8 branch the Docker build has to download a JDK:
|
RUN curl -L --retry 8 -s ${jdkUrl} | tar -C /opt -zxf - |
Two builds recently failed on this line:
Step 4/29 : RUN curl -L --retry 8 -s https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_x64_linux_hotspot_13_33.tar.gz | tar -C /opt -zxf -
---> Running in 29784e13f74f
gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
I suspect the benefit of the --retry is being lost because if a retry occurs after some of the previous attempt has been piped to tar then the overall input to tar will be corrupt. To get the benefit of --retry maybe it's better to download to a temporary file, then extract that only after curl has returned success, then finally delete the temporary file?
On the 6.8 branch the Docker build has to download a JDK:
elasticsearch/distribution/docker/src/docker/Dockerfile
Line 19 in 74fe2f4
Two builds recently failed on this line:
I suspect the benefit of the
--retryis being lost because if a retry occurs after some of the previous attempt has been piped totarthen the overall input totarwill be corrupt. To get the benefit of--retrymaybe it's better to download to a temporary file, then extract that only aftercurlhas returned success, then finally delete the temporary file?