From e53f481987848494b952808195b3800ac568e236 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Thu, 8 Aug 2024 18:55:08 +0000 Subject: [PATCH] Improve robustness on docker wget calls Build failures have occurred when the 'Connection timed out.' or 'Network is unreachable.' errors have been seen by wget calls to download Kafka. To make this more rebust add a set of retry parameters to all usages of wget during docker builds. Signed-off-by: Peter Nied --- .../src/main/docker/elasticsearchTestConsole/Dockerfile | 2 +- .../src/main/docker/migrationConsole/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TrafficCapture/dockerSolution/src/main/docker/elasticsearchTestConsole/Dockerfile b/TrafficCapture/dockerSolution/src/main/docker/elasticsearchTestConsole/Dockerfile index ed00e9638..b610e1fcd 100644 --- a/TrafficCapture/dockerSolution/src/main/docker/elasticsearchTestConsole/Dockerfile +++ b/TrafficCapture/dockerSolution/src/main/docker/elasticsearchTestConsole/Dockerfile @@ -32,7 +32,7 @@ RUN dnf install -y --setopt=install_weak_deps=False \ # Install HDF5 from source for Opensearch Benchmark compatibility with ARM ARG HDF5_VERSION=1.14.4 -RUN wget -q https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5_${HDF5_VERSION}.tar.gz -O /tmp/hdf5.tar.gz && \ +RUN wget --tries=5 --retry-connrefused --waitretry=15 -q https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5_${HDF5_VERSION}.tar.gz -O /tmp/hdf5.tar.gz && \ mkdir /tmp/hdf5 && \ tar -xzf /tmp/hdf5.tar.gz -C /tmp/hdf5 --strip-components=1 && \ rm /tmp/hdf5.tar.gz diff --git a/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/Dockerfile b/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/Dockerfile index f483e8794..c35b7de6d 100644 --- a/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/Dockerfile +++ b/TrafficCapture/dockerSolution/src/main/docker/migrationConsole/Dockerfile @@ -11,8 +11,8 @@ RUN mkdir /root/kafka-tools/aws WORKDIR /root/kafka-tools # Get kafka distribution and unpack to 'kafka' -RUN wget -O- https://archive.apache.org/dist/kafka/3.6.0/kafka_2.13-3.6.0.tgz | tar --transform 's!^[^/]*!kafka!' -xvz -RUN wget -O kafka/libs/msk-iam-auth.jar https://github.com/aws/aws-msk-iam-auth/releases/download/v2.0.3/aws-msk-iam-auth-2.0.3-all.jar +RUN wget --tries=5 --retry-connrefused --waitretry=15 -O- https://archive.apache.org/dist/kafka/3.6.0/kafka_2.13-3.6.0.tgz | tar --transform 's!^[^/]*!kafka!' -xvz +RUN wget --tries=5 --retry-connrefused --waitretry=15 -O kafka/libs/msk-iam-auth.jar https://github.com/aws/aws-msk-iam-auth/releases/download/v2.0.3/aws-msk-iam-auth-2.0.3-all.jar WORKDIR /root # Add Traffic Replayer jars for running KafkaPrinter from this container