diff --git a/Dockerfile.cicd b/Dockerfile.cicd index e48afb5..a2ce02f 100644 --- a/Dockerfile.cicd +++ b/Dockerfile.cicd @@ -8,18 +8,34 @@ ENV TZ=America/New_York # Configure timezone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -# Install apt-fast for faster downloads -RUN apt-get update && apt-get install -y \ - software-properties-common \ - && add-apt-repository -y ppa:apt-fast/stable \ - && apt-get update && apt-get install -y \ - apt-fast \ +# Install apt-fast with proper GPG handling +RUN apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ + for i in 1 2 3; do \ + echo "Attempt $i: Updating package lists..." && \ + apt-get update && break || \ + (echo "Update attempt $i failed, retrying..." && sleep 10); \ + done && \ + apt-get install -y \ + software-properties-common \ + gnupg \ + ca-certificates \ + curl \ + wget \ + && for i in 1 2 3; do \ + echo "Attempt $i: Adding apt-fast PPA..." && \ + add-apt-repository -y ppa:apt-fast/stable && \ + apt-get update && \ + apt-get install -y apt-fast && \ + break || \ + (echo "apt-fast installation attempt $i failed, retrying..." && sleep 10); \ + done \ && rm -rf /var/lib/apt/lists/* -# Configure apt-fast for non-interactive use with timeouts +# Configure apt-fast to use apt (not apt-get) with optimized settings RUN echo 'apt-fast apt-fast/maxdownloads string 10' | debconf-set-selections && \ echo 'apt-fast apt-fast/dlflag boolean true' | debconf-set-selections && \ - echo 'apt-fast apt-fast/aptmanager string apt-get' | debconf-set-selections + echo 'apt-fast apt-fast/aptmanager string apt' | debconf-set-selections # Configure apt timeouts and retries RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \