Skip to content

Commit

Permalink
[Dockerfile] Enable retries for apt-get when building Pulsar docker i…
Browse files Browse the repository at this point in the history
…mage (apache#14513)

- also reduce default timeout to 30 seconds
- prevents issues where apt repository doesn't respond
  • Loading branch information
lhotari authored Mar 2, 2022
1 parent 40e408d commit d3f6fe3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docker/pulsar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ ARG UBUNTU_MIRROR=mirror://mirrors.ubuntu.com/mirrors.txt

# 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 \
&& apt-get update \
&& apt-get -y dist-upgrade \
&& apt-get -y install --no-install-recommends openjdk-11-jdk-headless netcat dnsutils less procps iputils-ping \
Expand Down

0 comments on commit d3f6fe3

Please sign in to comment.