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 ```
This commit is contained in:
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user