You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/11/15 08:23:40 UTC

[GitHub] [pulsar] nodece commented on a diff in pull request #18449: [improve][build] dockerfile add timeout and retries threshold

nodece commented on code in PR #18449:
URL: https://github.com/apache/pulsar/pull/18449#discussion_r1022473653


##########
docker/pulsar/Dockerfile:
##########
@@ -53,10 +53,13 @@ FROM ubuntu:20.04
 
 ARG DEBIAN_FRONTEND=noninteractive
 ARG UBUNTU_MIRROR=mirror://mirrors.ubuntu.com/mirrors.txt
+# adjust TIMEOUT and RETIES when receiving "503  Service Unavailable" while running apt-get update
+ARG TIMEOUT=30
+ARG RETIES=3
 
 # Install some utilities
 RUN sed -i "s|http://archive\.ubuntu\.com/ubuntu/|${UBUNTU_MIRROR:-mirror://mirrors.ubuntu.com/mirrors.txt}|g" /etc/apt/sources.list \
-     && echo 'Acquire::http::Timeout "30";\nAcquire::ftp::Timeout "30";\nAcquire::Retries "3";' > /etc/apt/apt.conf.d/99timeout_and_retries \
+     && echo "Acquire::http::Timeout \"${TIMEOUT:-30}\";\nAcquire::ftp::Timeout \"${TIMEOUT:-30}\";\nAcquire::Retries \"${RETIES:-30}\";" > /etc/apt/apt.conf.d/99timeout_and_retries \

Review Comment:
   ```suggestion
        && echo "Acquire::http::Timeout \"${TIMEOUT}\";\nAcquire::ftp::Timeout \"${TIMEOUT}\";\nAcquire::Retries \"${RETIES}\";" > /etc/apt/apt.conf.d/99timeout_and_retries \
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org