export SHORTNAME make OSX-KVM

mojave-high-sierra
sickcodes 3 years ago
parent d36ac07b34
commit 31247a5f63

@ -58,7 +58,7 @@ SHELL ["/bin/bash", "-c"]
# change disk size here or add during build, e.g. --build-arg VERSION=10.14.5 --build-arg SIZE=50G # change disk size here or add during build, e.g. --build-arg VERSION=10.14.5 --build-arg SIZE=50G
ARG SIZE=200G ARG SIZE=200G
ARG VERSION=10.15.6 ARG VERSION=10.15.7
# OPTIONAL: Arch Linux server mirrors for super fast builds # OPTIONAL: Arch Linux server mirrors for super fast builds
# set RANKMIRRORS to any value other that nothing, e.g. -e RANKMIRRORS=true # set RANKMIRRORS to any value other that nothing, e.g. -e RANKMIRRORS=true
@ -144,25 +144,25 @@ RUN yes | sudo pacman -Syu qemu libvirt dnsmasq virt-manager bridge-utils openre
WORKDIR /home/arch/OSX-KVM WORKDIR /home/arch/OSX-KVM
RUN wget https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/fetch-macOS.py # RUN wget https://raw.githubusercontent.com/kholia/OSX-KVM/master/fetch-macOS-v2.py
RUN [[ "${VERSION%%.*}" -lt 11 ]] && { python fetch-macOS.py --version "${VERSION}" \ ARG SHORTNAME=
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c BaseSystem.img \
&& qemu-img create -f qcow2 mac_hdd_ng.img "${SIZE}" \ # VERSION will just set the appropriate shortname
&& rm -f BaseSystem.dmg \ RUN [[ "${SHORTNAME}" ]] || \
; } || true if [[ $(bc <<< "${VERSION} >= 10.13") = 0 ]]; then \
export SHORTNAME=high-sierra \
# VERSION=11.2.1 ; elif [[ $(bc <<< "${VERSION} >= 10.14") = 0 ]]; then \
# this downloads LATEST ONLY export SHORTNAME=mojave \
ARG FETCH_MAC_OS_RAW=https://raw.githubusercontent.com/acidanthera/OpenCorePkg/master/Utilities/macrecovery/macrecovery.py ; elif [[ $(bc <<< "${VERSION} >= 10.15") = 0 ]]; then \
# submit a PR to here to get the version option https://github.com/acidanthera/OpenCorePkg/blob/master/Utilities/macrecovery/macrecovery.py export SHORTNAME=catalina \
; elif [[ $(bc <<< "${VERSION} >= 11.6") = 0 ]]; then \
RUN [[ "${VERSION%%.*}" -ge 11 ]] && { wget "${FETCH_MAC_OS_RAW}" \ export SHORTNAME=big-sur \
&& python macrecovery.py download \ ; elif [[ $(bc <<< "${VERSION} > 11.6") = 0 ]]; then \
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c BaseSystem.img \ export SHORTNAME=monterey \
&& qemu-img create -f qcow2 mac_hdd_ng.img "${SIZE}" \ ; fi
&& rm -f BaseSystem.dmg \
; } || true RUN make
WORKDIR /home/arch/OSX-KVM WORKDIR /home/arch/OSX-KVM

Loading…
Cancel
Save