Skip to content

Commit 15c6268

Browse files
committed
docker updated, Install required packages with retry logic and better error handling
1 parent 5bf2b16 commit 15c6268

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

Dockerfile

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@ ENV DEBIAN_FRONTEND=noninteractive
88
ENV TZ=Europe/Berlin
99
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
1010

11-
# Install required packages with better error handling
12-
RUN apt-get update && apt-get install -y \
13-
git \
14-
cmake \
15-
ninja-build \
16-
doxygen \
17-
build-essential \
18-
graphviz \
19-
&& apt-get clean \
20-
&& rm -rf /var/lib/apt/lists/*
11+
# Install required packages with retry logic and better error handling
12+
RUN --mount=type=cache,target=/var/cache/apt \
13+
for i in $(seq 1 3); do \
14+
apt-get update --fix-missing && \
15+
apt-get install -y --no-install-recommends \
16+
git \
17+
cmake \
18+
ninja-build \
19+
doxygen \
20+
build-essential \
21+
graphviz \
22+
ca-certificates \
23+
&& break || sleep 10; \
24+
done && \
25+
apt-get clean && \
26+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2127

2228

0 commit comments

Comments
 (0)