From 5d1c5f43bc3a91ad72c79b5c1325e84543865b0a Mon Sep 17 00:00:00 2001 From: Mark <162816078+markashton480@users.noreply.github.com> Date: Sat, 28 Feb 2026 18:09:24 +0000 Subject: [PATCH] Harden Docker apt install with retry logic --- Dockerfile | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 361c3ff..3892e55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,26 +4,28 @@ ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 -RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential \ - libpq-dev \ - curl \ - nodejs \ - npm \ - libasound2 \ - libatk-bridge2.0-0 \ - libatk1.0-0 \ - libcups2 \ - libgbm1 \ - libgtk-3-0 \ - libnss3 \ - libx11-xcb1 \ - libxcomposite1 \ - libxdamage1 \ - libxfixes3 \ - libxrandr2 \ - fonts-liberation \ - && rm -rf /var/lib/apt/lists/* +RUN set -eux; \ + apt-get update -o Acquire::Retries=5; \ + apt-get install -y --no-install-recommends -o Acquire::Retries=5 \ + build-essential \ + libpq-dev \ + curl \ + nodejs \ + npm \ + libasound2 \ + libatk-bridge2.0-0 \ + libatk1.0-0 \ + libcups2 \ + libgbm1 \ + libgtk-3-0 \ + libnss3 \ + libx11-xcb1 \ + libxcomposite1 \ + libxdamage1 \ + libxfixes3 \ + libxrandr2 \ + fonts-liberation; \ + rm -rf /var/lib/apt/lists/* WORKDIR /app