From e431787e4e645b1cfd0be9fa19b4649efff82bb3 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Mar 2026 14:51:16 -0600 Subject: [PATCH] Retry on apt downloads in Docker (#18329) This failed with a 503 flake. I hate flakes. ``` E: Failed to fetch https://snapshot.ubuntu.com/.../libcurl4t64_8.5.0 -2ubuntu10.7_arm64.deb 503 Service Unavailable ``` --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index e877e947a..b7c602b9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,9 @@ ARG RUSTUP_VERSION=1.28.1 ENV HOME="/root" WORKDIR $HOME +# Retry apt downloads to handle transient mirror failures (e.g., 503s from snapshot.ubuntu.com). +RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries + # Install dependencies using an Ubuntu snapshot for reproducibility. # ca-certificates are required for using the snapshot. RUN --mount=type=cache,target=/var/lib/apt/lists \