aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile.naked
diff options
context:
space:
mode:
authorsickcodes <[email protected]>2021-02-25 14:03:06 +0000
committersickcodes <[email protected]>2021-02-25 14:03:06 +0000
commit23ab20c2fa5883dc6dd32300fde1d65bc50f9cfe (patch)
tree71cc3835dc1cae35b847cfb25ed74dbec91d3d84 /Dockerfile.naked
parentTypo (diff)
downloaddocker-osx-23ab20c2fa5883dc6dd32300fde1d65bc50f9cfe.tar.xz
docker-osx-23ab20c2fa5883dc6dd32300fde1d65bc50f9cfe.zip
Major serial number runtime generation and override changes.
Diffstat (limited to 'Dockerfile.naked')
-rw-r--r--Dockerfile.naked31
1 files changed, 27 insertions, 4 deletions
diff --git a/Dockerfile.naked b/Dockerfile.naked
index 06f9b9e..2bb8783 100644
--- a/Dockerfile.naked
+++ b/Dockerfile.naked
@@ -7,7 +7,7 @@
#
# Title: Mac on Docker (Docker-OSX) [AUTOINSTALL]
# Author: Sick.Codes https://twitter.com/sickcodes
-# Version: 3.1
+# Version: 3.2
# License: GPLv3+
# Repository: https://github.com/sickcodes/Docker-OSX
#
@@ -29,7 +29,7 @@
# docker run -it --device /dev/kvm -p 50922:10022 -v ${PWD}/mac_hdd_ng.img:/image -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix docker-osx:naked
#
-FROM sickcodes/docker-osx:latest
+FROM docker-osx:latest
MAINTAINER 'https://twitter.com/sickcodes' <https://sick.codes>
@@ -112,6 +112,29 @@ CMD [[ "${DISPLAY}" = ':99' ]] && { \
& until [[ "$(xrandr --query 2>/dev/null)" ]]; do sleep 1 ; done \
; } \
; sudo chown "$(id -u)":"$(id -g)" "${IMAGE_PATH}" 2>/dev/null || true \
- ; ./enable-ssh.sh \
; [[ "${NOPICKER}" == true ]] && mv ./Launch-nopicker.sh ./Launch.sh \
- ; envsubst < ./Launch.sh | bash
+ ; [[ "${GENERATE_UNIQUE}" == true ]] \
+ && ./Docker-OSX/custom/generate-unique-machine-values.sh \
+ --count 1 \
+ --tsv ./serial.tsv \
+ --bootdisks \
+ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
+ --output-env "${ENV:=/env}" \
+ && source "${ENV}" \
+ ; [[ "${GENERATE_SPECIFIC}" == true ]] \
+ && source /env \
+ || ./Docker-OSX/custom/generate-specific-bootdisk.sh \
+ --model "${DEVICE_MODEL}" \
+ --serial "${SERIAL}" \
+ --board-serial "${BOARD_SERIAL}" \
+ --uuid "${UUID}" \
+ --mac-address "${MAC_ADDRESS}" \
+ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
+ ; case "$(file --brief /bootdisk)" in \
+ QEMU\ QCOW2\ Image* ) export BOOTDISK=/bootdisk \
+ ; sudo chown "$(id -u)":"$(id -g)" "${BOOTDISK}" 2>/dev/null || true \
+ ;; \
+ directory* ) export BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 \
+ ;; \
+ esac \
+ ; ./enable-ssh.sh && envsubst < ./Launch.sh | bash