aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsickcodes <[email protected]>2021-11-29 04:34:20 +0000
committersickcodes <[email protected]>2021-11-29 04:34:20 +0000
commite55e55229da4c15dce0523e317819cf491880a35 (patch)
treec263ef4f988be11c3c7c7ef9affd8ff9c7ba7f21
parentShrink the Docker containers, significantly. (diff)
downloaddocker-osx-e55e55229da4c15dce0523e317819cf491880a35.tar.xz
docker-osx-e55e55229da4c15dce0523e317819cf491880a35.zip
Use qcow for BaseSystem.img instead because it sheds 2G off image size. Add back in stock OpenCore bootdisks; size negligible after removing cache.
-rw-r--r--Dockerfile11
-rw-r--r--Dockerfile.naked46
2 files changed, 32 insertions, 25 deletions
diff --git a/Dockerfile b/Dockerfile
index 9aa8bc1..26d52e9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -147,7 +147,9 @@ WORKDIR /home/arch/OSX-KVM
ARG SHORTNAME=catalina
-RUN make
+RUN make \
+ && qemu-img convert BaseSystem.dmg -O qcow2 -p -c BaseSystem.img \
+ && rm ./BaseSystem.dmg
ARG LINUX=true
@@ -182,7 +184,7 @@ RUN touch Launch.sh \
&& tee -a Launch.sh <<< '-smbios type=2 \' \
&& tee -a Launch.sh <<< '-audiodev ${AUDIO_DRIVER:-alsa},id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda \' \
&& tee -a Launch.sh <<< '-device ich9-ahci,id=sata \' \
- && 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 <<< '-drive id=OpenCoreBoot,if=none,snapshot=on,format=${BASESYSTEM_FORMAT},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=raw \' \
@@ -285,6 +287,11 @@ RUN ln -s /home/arch/OSX-KVM/OpenCore /home/arch/OSX-KVM/OpenCore-Catalina || tr
# for example, -e ADDITIONAL_PORTS=hostfwd=tcp::23-:23,
ENV ADDITIONAL_PORTS=
+# since the Makefile uses raw, and raw uses the full disk amount
+# we want to use a compressed qcow2
+# ENV BASESYSTEM_FORMAT=raw
+ENV BASESYSTEM_FORMAT=qcow2
+
# add additional QEMU boot arguments
ENV BOOT_ARGS=
diff --git a/Dockerfile.naked b/Dockerfile.naked
index f7425f9..28e605f 100644
--- a/Dockerfile.naked
+++ b/Dockerfile.naked
@@ -243,29 +243,29 @@ ARG STOCK_MASTER_PLIST_URL_NOPICKER=https://raw.githubusercontent.com/sickcodes/
ARG STOCK_BOOTDISK=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2
ARG STOCK_BOOTDISK_NOPICKER=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2
-# RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
-# --master-plist-url="${STOCK_MASTER_PLIST_URL}" \
-# --model "${STOCK_DEVICE_MODEL}" \
-# --serial "${STOCK_SERIAL}" \
-# --board-serial "${STOCK_BOARD_SERIAL}" \
-# --uuid "${STOCK_UUID}" \
-# --mac-address "${STOCK_MAC_ADDRESS}" \
-# --width "${STOCK_WIDTH}" \
-# --height "${STOCK_HEIGHT}" \
-# --output-bootdisk "${STOCK_BOOTDISK}" || exit 1 \
-# ; rm -rf /var/tmp/.guestfs-*
-
-# RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
-# --master-plist-url="${STOCK_MASTER_PLIST_URL_NOPICKER}" \
-# --model "${STOCK_DEVICE_MODEL}" \
-# --serial "${STOCK_SERIAL}" \
-# --board-serial "${STOCK_BOARD_SERIAL}" \
-# --uuid "${STOCK_UUID}" \
-# --mac-address "${STOCK_MAC_ADDRESS}" \
-# --width "${STOCK_WIDTH}" \
-# --height "${STOCK_HEIGHT}" \
-# --output-bootdisk "${STOCK_BOOTDISK_NOPICKER}" || exit 1 \
-# ; rm -rf /var/tmp/.guestfs-*
+RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
+ --master-plist-url="${STOCK_MASTER_PLIST_URL}" \
+ --model "${STOCK_DEVICE_MODEL}" \
+ --serial "${STOCK_SERIAL}" \
+ --board-serial "${STOCK_BOARD_SERIAL}" \
+ --uuid "${STOCK_UUID}" \
+ --mac-address "${STOCK_MAC_ADDRESS}" \
+ --width "${STOCK_WIDTH}" \
+ --height "${STOCK_HEIGHT}" \
+ --output-bootdisk "${STOCK_BOOTDISK}" || exit 1 \
+ ; rm -rf /var/tmp/.guestfs-*
+
+RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
+ --master-plist-url="${STOCK_MASTER_PLIST_URL_NOPICKER}" \
+ --model "${STOCK_DEVICE_MODEL}" \
+ --serial "${STOCK_SERIAL}" \
+ --board-serial "${STOCK_BOARD_SERIAL}" \
+ --uuid "${STOCK_UUID}" \
+ --mac-address "${STOCK_MAC_ADDRESS}" \
+ --width "${STOCK_WIDTH}" \
+ --height "${STOCK_HEIGHT}" \
+ --output-bootdisk "${STOCK_BOOTDISK_NOPICKER}" || exit 1 \
+ ; rm -rf /var/tmp/.guestfs-*
WORKDIR /home/arch/OSX-KVM