diff --git a/scripts/docker/install-sh-nonroot/Dockerfile b/scripts/docker/install-sh-nonroot/Dockerfile index 18a3c82b5..1eeccc0c5 100644 --- a/scripts/docker/install-sh-nonroot/Dockerfile +++ b/scripts/docker/install-sh-nonroot/Dockerfile @@ -1,7 +1,13 @@ FROM ubuntu:24.04 -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ +RUN set -eux; \ + for attempt in 1 2 3; do \ + if apt-get update -o Acquire::Retries=3; then break; fi; \ + echo "apt-get update failed (attempt ${attempt})" >&2; \ + if [ "${attempt}" -eq 3 ]; then exit 1; fi; \ + sleep 3; \ + done; \ + apt-get -o Acquire::Retries=3 install -y --no-install-recommends \ bash \ ca-certificates \ curl \ diff --git a/scripts/docker/install-sh-smoke/Dockerfile b/scripts/docker/install-sh-smoke/Dockerfile index fb0f67dc3..c4d5e850a 100644 --- a/scripts/docker/install-sh-smoke/Dockerfile +++ b/scripts/docker/install-sh-smoke/Dockerfile @@ -1,7 +1,13 @@ FROM node:22-bookworm-slim -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ +RUN set -eux; \ + for attempt in 1 2 3; do \ + if apt-get update -o Acquire::Retries=3; then break; fi; \ + echo "apt-get update failed (attempt ${attempt})" >&2; \ + if [ "${attempt}" -eq 3 ]; then exit 1; fi; \ + sleep 3; \ + done; \ + apt-get -o Acquire::Retries=3 install -y --no-install-recommends \ bash \ ca-certificates \ curl \