Add retry logic for external dependency downloads in Dockerfile #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Build run #6 failed because
download.savannah.gnu.orgreturned HTTP 502 when downloading freetype-2.13.3.tar.gz (Dockerfile line 175). The URL works intermittently — GNU Savannah mirrors are unreliable and frequently return transient errors.The Dockerfile has ~74 build steps, many of which download source tarballs from external servers (freetype, fribidi, fontconfig, lame, nv-codec-headers, etc). Any single transient failure kills the entire build with no recovery.
Impact
Suggested fix
Add
--retry 3 --retry-delay 5to allcurlcommands in the Dockerfile. This handles transient 5xx errors without making the Dockerfile significantly more complex.Example:
This should be applied to every
curlinvocation in the Dockerfile.