Skip to content

Commit 0824123

Browse files
add robust retry logic to FIPS Dockerfile apt-get
Adds retry loop with 5 attempts and 15-second delays to handle transient mirror rate-limiting (403 errors) on ARM64 builds. Co-Authored-By: Claude (global.anthropic.claude-opus-4-5-20251101-v1:0) <noreply@anthropic.com>
1 parent 3814757 commit 0824123

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

Dockerfile.Node22fips

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,33 @@ ENV DEBIAN_FRONTEND=noninteractive
88
RUN apt-get update
99
RUN apt-get install -y software-properties-common
1010
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test
11-
RUN apt-get update && apt-get install -y build-essential python3 python3-distutils g++-10 make curl git pkg-config libssl-dev libffi-dev libgmp-dev libtool autoconf automake cmake wget xz-utils unzip
11+
RUN set -e; \
12+
for i in 1 2 3 4 5; do \
13+
echo "Attempt $i: Updating and installing..."; \
14+
apt-get update --allow-releaseinfo-change && \
15+
apt-get install -y --no-install-recommends --fix-missing \
16+
build-essential \
17+
python3 \
18+
python3-distutils \
19+
g++-10 \
20+
make \
21+
curl \
22+
git \
23+
pkg-config \
24+
libssl-dev \
25+
libffi-dev \
26+
libgmp-dev \
27+
libtool \
28+
autoconf \
29+
automake \
30+
cmake \
31+
wget \
32+
xz-utils \
33+
unzip \
34+
vim \
35+
&& break || \
36+
echo "Attempt $i failed! Waiting 15 seconds..." && sleep 15; \
37+
done
1238
RUN rm -rf /var/lib/apt/lists/*
1339

1440
# Set g++ 10 as the default

0 commit comments

Comments
 (0)