From 91131a6bbbe92615852e14e4b8e427ebe743f3a5 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Fri, 26 Feb 2021 09:25:40 +0000 Subject: [PATCH] Add exists exits and required serial number files for building disk --- Dockerfile | 4 ++-- Dockerfile.auto | 4 ++-- Dockerfile.naked | 4 ++-- README.md | 5 +++-- custom/generate-unique-machine-values.sh | 2 ++ 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 77445c9..f9570ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -281,7 +281,7 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS --tsv ./serial.tsv \ --bootdisks \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ - --output-env "${ENV:=/env}" \ + --output-env "${ENV:=/env}" || exit 1 \ ; } \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \ source "${ENV:=/env}" \ @@ -291,7 +291,7 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS --board-serial "${BOARD_SERIAL}" \ --uuid "${UUID}" \ --mac-address "${MAC_ADDRESS}" \ - --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ + --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" || exit 1 \ ; } \ ; case "$(file --brief /bootdisk)" in \ QEMU\ QCOW2\ Image* ) export BOOTDISK=/bootdisk \ diff --git a/Dockerfile.auto b/Dockerfile.auto index 15f6339..6f6b739 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -153,7 +153,7 @@ CMD echo "${BOILERPLATE}" \ --tsv ./serial.tsv \ --bootdisks \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ - --output-env "${ENV:=/env}" \ + --output-env "${ENV:=/env}" || exit 1 \ ; } \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \ source "${ENV:=/env}" \ @@ -163,7 +163,7 @@ CMD echo "${BOILERPLATE}" \ --board-serial "${BOARD_SERIAL}" \ --uuid "${UUID}" \ --mac-address "${MAC_ADDRESS}" \ - --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ + --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" || exit 1 \ ; } \ ; case "$(file --brief /bootdisk)" in \ QEMU\ QCOW2\ Image* ) export BOOTDISK=/bootdisk \ diff --git a/Dockerfile.naked b/Dockerfile.naked index 5c17c93..04368bc 100644 --- a/Dockerfile.naked +++ b/Dockerfile.naked @@ -126,7 +126,7 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS --tsv ./serial.tsv \ --bootdisks \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ - --output-env "${ENV:=/env}" \ + --output-env "${ENV:=/env}" || exit 1 \ ; } \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \ source "${ENV:=/env}" \ @@ -136,7 +136,7 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS --board-serial "${BOARD_SERIAL}" \ --uuid "${UUID}" \ --mac-address "${MAC_ADDRESS}" \ - --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ + --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" || exit 1 \ ; } \ ; case "$(file --brief /bootdisk)" in \ QEMU\ QCOW2\ Image* ) export BOOTDISK=/bootdisk \ diff --git a/README.md b/README.md index 78e1f52..5cba153 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ If you run out of space, you can delete all your Docker images/history/cache by docker pull sickcodes/docker-osx:auto -# boot directly into a real OSX shell with no display (Xvfb) +# boot directly into a real OSX shell with no display (Xvfb) [HEADLESS] docker run -it \ --device /dev/kvm \ -p 50922:10022 \ @@ -92,7 +92,7 @@ docker run -it \ docker pull sickcodes/docker-osx:auto -# boot directly into a real OSX shell with a visual display +# boot directly into a real OSX shell with a visual display [NOT HEADLESS] docker run -it \ --device /dev/kvm \ -p 50922:10022 \ @@ -144,6 +144,7 @@ Supply your own local image with `-v "${PWD}/mac_hdd_ng.img:/image"` and use `si docker pull sickcodes/docker-osx:naked # run your own image + SSH +# change mac_hdd_ng.img docker run -it \ --device /dev/kvm \ -p 50922:10022 \ diff --git a/custom/generate-unique-machine-values.sh b/custom/generate-unique-machine-values.sh index 6692e29..4b2409a 100755 --- a/custom/generate-unique-machine-values.sh +++ b/custom/generate-unique-machine-values.sh @@ -183,6 +183,8 @@ download_qcow_efi_folder () { generate_serial_sets () { + [[ -e ./config-nopicker-custom.plist ]] || wget https://raw.githubusercontent.com/sickcodes/Docker-OSX/custom-identity/custom/config-nopicker-custom.plist + [[ -e ./opencore-image-ng.sh ]] || wget https://raw.githubusercontent.com/sickcodes/Docker-OSX/custom-identity/custom/opencore-image-ng.sh && chmod +x opencore-image-ng.sh mkdir -p "${OUTPUT_DIRECTORY}/envs" export DATE_NOW="$(date +%F-%T)" export DEVICE_MODEL="${DEVICE_MODEL:=iMacPro1,1}"