File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,22 @@ RUN set -eux; \
2020 -d $DOCKER_USER_HOME -ms /bin/bash $DOCKER_USER
2121RUN mkdir /application && chown $DOCKER_USER:$DOCKER_USER /application
2222RUN set -eux; \
23- curl -fsSL "https://archlinux.org/mirrorlist/?country=${MIRROR_LIST_COUNTRY}&protocol=http&protocol=https&ip_version=4" \
24- | sed -e 's/^\s *#Server/Server/' -e '/^\s *#/d' \
25- > /etc/pacman.d/mirrorlist; \
26- grep -q '^Server' /etc/pacman.d/mirrorlist
23+ tmp="$(mktemp)" ; \
24+ if curl -fsSL \
25+ --connect-timeout 10 \
26+ --max-time 30 \
27+ --retry 5 \
28+ --retry-delay 1 \
29+ --retry-all-errors \
30+ "https://archlinux.org/mirrorlist/?country=${MIRROR_LIST_COUNTRY}&protocol=https&ip_version=4&use_mirror_status=on" \
31+ | sed -e 's/^\s *#Server/Server/' -e '/^\s *#/d' \
32+ > "$tmp" \
33+ && grep -q '^Server' "$tmp" ; then \
34+ mv "$tmp" /etc/pacman.d/mirrorlist; \
35+ else \
36+ echo "WARN: mirrorlist update failed; keeping existing /etc/pacman.d/mirrorlist" >&2; \
37+ rm -f "$tmp" ; \
38+ fi
2739RUN pacman -Syu --noconfirm && \
2840 pacman -S --noconfirm --needed $BUILD_PACKAGES && \
2941 pacman -Scc --noconfirm && \
You can’t perform that action at this time.
0 commit comments