diff options
| author | sickcodes <[email protected]> | 2021-01-05 13:15:44 +0000 |
|---|---|---|
| committer | sickcodes <[email protected]> | 2021-01-05 13:15:44 +0000 |
| commit | 8d6d0359b1fcebd368cf9d21e6955bacadb03526 (patch) | |
| tree | cff6dc8f87bad616bb57b5589f024d1dbb927dce /vnc-version/Dockerfile | |
| parent | Merge pull request #121 from PeterDaveHello/ImproveDockerfile (diff) | |
| download | docker-osx-8d6d0359b1fcebd368cf9d21e6955bacadb03526.tar.xz docker-osx-8d6d0359b1fcebd368cf9d21e6955bacadb03526.zip | |
v2.7 Replace gibMacOS with fetch-macOS.py. Replace iptables with iptables-nft. Remove libguestfs.
Diffstat (limited to 'vnc-version/Dockerfile')
| -rw-r--r-- | vnc-version/Dockerfile | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/vnc-version/Dockerfile b/vnc-version/Dockerfile index 0b3fe0f..971dfb1 100644 --- a/vnc-version/Dockerfile +++ b/vnc-version/Dockerfile @@ -7,7 +7,7 @@ # # Title: Mac on Docker (Docker-OSX) [VNC EDITION] # Author: Sick.Codes https://sick.codes/ -# Version: 2.6 +# Version: 2.7 # License: GPLv3+ # # All credits for OSX-KVM and the rest at Kholia's repo: https://github.com/kholia/osx-kvm @@ -72,14 +72,21 @@ MAINTAINER 'https://twitter.com/sickcodes' <https://sick.codes> USER root -RUN 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' +ARG RANKMIRRORS=no +ARG MIRROR_COUNTRY=US +ARG MIRROR_COUNT=10 -# ARG MIRROR_COUNTRY=US -# RUN curl -s "https://www.archlinux.org/mirrorlist/?country=${MIRROR_COUNTRY}&protocol=https&use_mirror_status=on" | \ -# sed -e 's/^#Server/Server/' -e '/^#/d' | \ -# rankmirrors -n 5 - > /etc/pacman.d/mirrorlist +# 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 USER arch |