CI: Add timeouts for apt commands in docker builder Dockerfiles

This commit is contained in:
Tim Wojtulewicz 2023-10-11 11:21:43 -07:00
parent dc8e98d790
commit 2d8e7368ae
2 changed files with 10 additions and 0 deletions

View file

@ -3,8 +3,13 @@
# Final layer containing all artifacts.
FROM debian:bookworm-slim
# Allow apt to retry 3 times before failing.
RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries
# Force apt to timeout retrieval of data after 3 minutes.
RUN echo 'Acquire::http::timeout "180";' > /etc/apt/apt.conf.d/99-timeouts
RUN echo 'Acquire::https::timeout "180";' >> /etc/apt/apt.conf.d/99-timeouts
RUN apt-get -q update \
&& apt-get install -q -y --no-install-recommends \
ca-certificates \