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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to