Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Unknown
-
N/A
-
N/A
-
Description
Problem
The Dockerfile downloads three large artifacts with a plain curl -fSL, with no retry: the XWiki WAR
(~350 MB) from maven.xwiki.org, the LibreOffice archive (~350 MB) from
download.documentfoundation.org, and the JDBC driver from Maven Central. A single hiccup on any of
them aborts the whole build.
This is not theoretical, it happens regularly:
- In the Docker Official Images pull request updating the image to 18.6.0, the 16 and
17-mariadb-tomcat builds failed with curl: (92) HTTP/2 stream 1 was not closed cleanly: CANCEL
while downloading the XWiki WAR, after the transfer had slowed to 181 KB/s. The other variants
downloading the very same WAR succeeded, so the artifact was fine. - Building the twelve variants in our own CI, two of them failed with
curl: (35) Recv failure: Connection reset by peer while downloading the LibreOffice archive.
Every failure means a manual re-run, and for the Docker Official Images builds it means asking their
maintainers to re-run.
Fix
Let curl retry these downloads instead of giving up on the first error. The sha256 verification that
follows each download is what guarantees correctness, so retrying only affects reliability.