File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,10 +3,14 @@ FROM eclipse-temurin:17 AS builder
33ARG MAVEN_VERSION=3.9.6
44ARG USER_HOME_DIR="/root"
55ARG SHA=706f01b20dec0305a822ab614d51f32b07ee11d0218175e55450242e49d2156386483b506b3a4e8a03ac8611bae96395fd5eec15f50d3013d5deed6d1ee18224
6- ARG BASE_URL=https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/
6+ ARG BASE_URL=https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries
77
88RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
9- && curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
9+ && for i in 1 2 3; do \
10+ echo "Attempt $i to download Maven..." && \
11+ curl -fsSL --connect-timeout 300 --max-time 600 -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz && break || \
12+ (echo "Download failed, attempt $i of 3" && sleep 10); \
13+ done \
1014 && echo "${SHA} /tmp/apache-maven.tar.gz" | sha512sum -c - \
1115 && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \
1216 && rm -f /tmp/apache-maven.tar.gz \
You can’t perform that action at this time.
0 commit comments