From 31247a5f63d72455c61477685bd08317cdf7ad2f Mon Sep 17 00:00:00 2001 From: sickcodes Date: Wed, 3 Nov 2021 22:32:06 +0000 Subject: export SHORTNAME make OSX-KVM --- Dockerfile | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 01d2887..b2ba2eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 ARG SIZE=200G -ARG VERSION=10.15.6 +ARG VERSION=10.15.7 # OPTIONAL: Arch Linux server mirrors for super fast builds # 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 -RUN wget https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/fetch-macOS.py - -RUN [[ "${VERSION%%.*}" -lt 11 ]] && { python fetch-macOS.py --version "${VERSION}" \ - && qemu-img convert BaseSystem.dmg -O qcow2 -p -c BaseSystem.img \ - && qemu-img create -f qcow2 mac_hdd_ng.img "${SIZE}" \ - && rm -f BaseSystem.dmg \ - ; } || true - -# VERSION=11.2.1 -# this downloads LATEST ONLY -ARG FETCH_MAC_OS_RAW=https://raw.githubusercontent.com/acidanthera/OpenCorePkg/master/Utilities/macrecovery/macrecovery.py -# submit a PR to here to get the version option https://github.com/acidanthera/OpenCorePkg/blob/master/Utilities/macrecovery/macrecovery.py - -RUN [[ "${VERSION%%.*}" -ge 11 ]] && { wget "${FETCH_MAC_OS_RAW}" \ - && python macrecovery.py download \ - && qemu-img convert BaseSystem.dmg -O qcow2 -p -c BaseSystem.img \ - && qemu-img create -f qcow2 mac_hdd_ng.img "${SIZE}" \ - && rm -f BaseSystem.dmg \ - ; } || true +# RUN wget https://raw.githubusercontent.com/kholia/OSX-KVM/master/fetch-macOS-v2.py + +ARG SHORTNAME= + +# VERSION will just set the appropriate shortname +RUN [[ "${SHORTNAME}" ]] || \ + if [[ $(bc <<< "${VERSION} >= 10.13") = 0 ]]; then \ + export SHORTNAME=high-sierra \ + ; elif [[ $(bc <<< "${VERSION} >= 10.14") = 0 ]]; then \ + export SHORTNAME=mojave \ + ; elif [[ $(bc <<< "${VERSION} >= 10.15") = 0 ]]; then \ + export SHORTNAME=catalina \ + ; elif [[ $(bc <<< "${VERSION} >= 11.6") = 0 ]]; then \ + export SHORTNAME=big-sur \ + ; elif [[ $(bc <<< "${VERSION} > 11.6") = 0 ]]; then \ + export SHORTNAME=monterey \ + ; fi + +RUN make WORKDIR /home/arch/OSX-KVM -- cgit v1.2.3 From 7f7a24f1d3ea03efc619a0a2dd1409c9cf432397 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sat, 13 Nov 2021 07:44:57 +0000 Subject: Fix shell --- Dockerfile | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index b2ba2eb..1faade7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -149,17 +149,12 @@ WORKDIR /home/arch/OSX-KVM ARG SHORTNAME= # VERSION will just set the appropriate shortname -RUN [[ "${SHORTNAME}" ]] || \ - if [[ $(bc <<< "${VERSION} >= 10.13") = 0 ]]; then \ - export SHORTNAME=high-sierra \ - ; elif [[ $(bc <<< "${VERSION} >= 10.14") = 0 ]]; then \ - export SHORTNAME=mojave \ - ; elif [[ $(bc <<< "${VERSION} >= 10.15") = 0 ]]; then \ - export SHORTNAME=catalina \ - ; elif [[ $(bc <<< "${VERSION} >= 11.6") = 0 ]]; then \ - export SHORTNAME=big-sur \ - ; elif [[ $(bc <<< "${VERSION} > 11.6") = 0 ]]; then \ - export SHORTNAME=monterey \ +RUN if [[ ! "${SHORTNAME}" ]]; then \ + { [[ $(bc <<< "${VERSION} >= 10.13") = 0 ]] && export SHORTNAME=high-sierra ; } \ + || { [[ $(bc <<< "${VERSION} >= 10.14") = 0 ]] && export SHORTNAME=mojave ; } \ + || { [[ $(bc <<< "${VERSION} >= 10.15") = 0 ]] && export SHORTNAME=catalina ; } \ + || { [[ $(bc <<< "${VERSION} >= 11.6") = 0 ]] && export SHORTNAME=big-sur ; } \ + || { [[ $(bc <<< "${VERSION} > 11.6") = 0 ]] && export SHORTNAME=monterey ; } \ ; fi RUN make -- cgit v1.2.3 From 7da38e0d83730116f71106443d48c8837918f7e5 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sat, 13 Nov 2021 07:48:42 +0000 Subject: Missed bc --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 1faade7..b8a358f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -139,7 +139,7 @@ RUN touch enable-ssh.sh \ # RUN yes | sudo pacman -Syu qemu libvirt dnsmasq virt-manager bridge-utils edk2-ovmf netctl libvirt-dbus --overwrite --noconfirm -RUN yes | sudo pacman -Syu qemu libvirt dnsmasq virt-manager bridge-utils openresolv jack ebtables edk2-ovmf netctl libvirt-dbus wget --overwrite --noconfirm \ +RUN yes | sudo pacman -Syu bc qemu libvirt dnsmasq virt-manager bridge-utils openresolv jack ebtables edk2-ovmf netctl libvirt-dbus wget --overwrite --noconfirm \ && yes | sudo pacman -Scc WORKDIR /home/arch/OSX-KVM -- cgit v1.2.3 From 6729dd787738e462b26daac74c96f1d51bf55be4 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sun, 14 Nov 2021 03:29:19 +0000 Subject: `--build-arg=mojave`, `--build-arg=big-sur`, `--build-arg=monterey`, `--build-arg=catalina` --- Dockerfile | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index b8a358f..5ba6108 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,7 +58,6 @@ SHELL ["/bin/bash", "-c"] # change disk size here or add during build, e.g. --build-arg VERSION=10.14.5 --build-arg SIZE=50G ARG SIZE=200G -ARG VERSION=10.15.7 # OPTIONAL: Arch Linux server mirrors for super fast builds # set RANKMIRRORS to any value other that nothing, e.g. -e RANKMIRRORS=true @@ -146,21 +145,10 @@ WORKDIR /home/arch/OSX-KVM # RUN wget https://raw.githubusercontent.com/kholia/OSX-KVM/master/fetch-macOS-v2.py -ARG SHORTNAME= - -# VERSION will just set the appropriate shortname -RUN if [[ ! "${SHORTNAME}" ]]; then \ - { [[ $(bc <<< "${VERSION} >= 10.13") = 0 ]] && export SHORTNAME=high-sierra ; } \ - || { [[ $(bc <<< "${VERSION} >= 10.14") = 0 ]] && export SHORTNAME=mojave ; } \ - || { [[ $(bc <<< "${VERSION} >= 10.15") = 0 ]] && export SHORTNAME=catalina ; } \ - || { [[ $(bc <<< "${VERSION} >= 11.6") = 0 ]] && export SHORTNAME=big-sur ; } \ - || { [[ $(bc <<< "${VERSION} > 11.6") = 0 ]] && export SHORTNAME=monterey ; } \ - ; fi +ARG SHORTNAME RUN make -WORKDIR /home/arch/OSX-KVM - ARG LINUX=true # required to use libguestfs inside a docker container, to create bootdisks for docker-osx on-the-fly -- cgit v1.2.3 From 8112e97bbf2b9cf26e1ad9504cec39d973df91c3 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sun, 14 Nov 2021 16:07:23 +0000 Subject: raw image format --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 5ba6108..f57989a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -185,7 +185,7 @@ RUN touch Launch.sh \ && tee -a Launch.sh <<< '-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=${BOOTDISK:-/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2} \' \ && tee -a Launch.sh <<< '-device ide-hd,bus=sata.2,drive=OpenCoreBoot \' \ && tee -a Launch.sh <<< '-device ide-hd,bus=sata.3,drive=InstallMedia \' \ - && tee -a Launch.sh <<< '-drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=qcow2 \' \ + && tee -a Launch.sh <<< '-drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=raw \' \ && tee -a Launch.sh <<< '-drive id=MacHDD,if=none,file=${IMAGE_PATH:-/home/arch/OSX-KVM/mac_hdd_ng.img},format=${IMAGE_FORMAT:-qcow2} \' \ && tee -a Launch.sh <<< '-device ide-hd,bus=sata.4,drive=MacHDD \' \ && tee -a Launch.sh <<< '-netdev user,id=net0,hostfwd=tcp::${INTERNAL_SSH_PORT:-10022}-:22,hostfwd=tcp::${SCREEN_SHARE_PORT:-5900}-:5900,${ADDITIONAL_PORTS} \' \ -- cgit v1.2.3