diff options
| author | sickcodes <[email protected]> | 2021-01-05 10:03:25 +0000 |
|---|---|---|
| committer | sickcodes <[email protected]> | 2021-01-05 10:03:25 +0000 |
| commit | bac7f39317676249c4578339c042d158c46cef5b (patch) | |
| tree | 547c8050460e6b4281a4548bd25aaed491422349 /Dockerfile | |
| parent | Add rankmirrors for minimal automated mirror fetching. (diff) | |
| download | docker-osx-bac7f39317676249c4578339c042d158c46cef5b.tar.xz docker-osx-bac7f39317676249c4578339c042d158c46cef5b.zip | |
Added CHANGELOG, rankmirrors buildargs: RANKMIRRORS=yes, MIRROR_COUNTRY=US, MIRROR_COUNT=10
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -59,6 +59,22 @@ MAINTAINER 'https://sick.codes' <https://sick.codes> ARG SIZE=200G ARG VERSION=10.15.6 +ARG RANKMIRRORS=no +ARG MIRROR_COUNTRY=US +ARG MIRROR_COUNT=10 + +# Arch Linux server mirrors for faster builds +RUN if [[ "${RANKMIRRORS}" = yes ]]; then { pacman -Sy wget --noconfirm || pacman -Syu wget --noconfirm ; } \ + ; wget -O ./rankmirrors "https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/rankmirrors" \ + ; wget -O- "https://www.archlinux.org/mirrorlist/?country=${MIRROR_COUNTRY:-US}&protocol=https&use_mirror_status=on" \ + | sed -e 's/^#Server/Server/' -e '/^#/d' \ + | head -n "$((${MIRROR_COUNT:-10}+1))" \ + | bash ./rankmirrors --verbose --max-time 5 - > /etc/pacman.d/mirrorlist \ + && tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirrors.evowise.com/archlinux/$repo/os/$arch' \ + && tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch' \ + && tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch' \ + && cat /etc/pacman.d/mirrorlist; fi + # This fails on hub.docker.com, useful for debugging in cloud # RUN [[ $(egrep -c '(svm|vmx)' /proc/cpuinfo) -gt 0 ]] || { echo KVM not possible on this host && exit 1; } |