You've already forked Docker-OSX
mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2025-07-03 03:03:31 -05:00
Compare commits
57 Commits
stock-imag
...
rollback-n
Author | SHA1 | Date | |
---|---|---|---|
e718aec193 | |||
0202359871 | |||
a04466a704 | |||
21b17535b5 | |||
e79ce8a273 | |||
d028bd341b | |||
c6c6c69851 | |||
be0c44928f | |||
8ae71a36d1 | |||
030258ef67 | |||
7300479b9a | |||
2d79f06079 | |||
c9b33ddb62 | |||
4805b9169b | |||
e55e55229d | |||
bc79a1fffb | |||
8dc03683e1 | |||
55b4820e07 | |||
d2e2604cfc | |||
abce04d6fe | |||
3f7256e145 | |||
5fdf587a29 | |||
8689e0e12c | |||
9ca9372da1 | |||
b820ec4ef2 | |||
8112e97bbf | |||
cc4303b5f3 | |||
71e4fa60cd | |||
6729dd7877 | |||
7da38e0d83 | |||
7f7a24f1d3 | |||
c913b66853 | |||
629563eb52 | |||
31247a5f63 | |||
d36ac07b34 | |||
c65f80ab16 | |||
e6fcfd86db | |||
0a0ae76333 | |||
dca8b28f9f | |||
50c87a4bac | |||
1d8682403f | |||
d40be09953 | |||
9639fa2289 | |||
24033387a3 | |||
7dfd04eafd | |||
5806f862d3 | |||
5a159c19e9 | |||
1d6168dfed | |||
50c5dce110 | |||
ff250fa0ca | |||
302885dc08 | |||
fcfba30086 | |||
df10b3c651 | |||
e265065e31 | |||
beef908d4c | |||
12b8ce7a2b | |||
9c8d70c9da |
22
CREDITS.md
22
CREDITS.md
@ -1,5 +1,7 @@
|
|||||||
# Credits
|
# Credits
|
||||||
|
|
||||||
|
The most important part of the project. You.
|
||||||
|
|
||||||
## Upstream Acknowledgements:
|
## Upstream Acknowledgements:
|
||||||
|
|
||||||
This project uses OSX-KVM from https://github.com/kholia/OSX-KVM and fully appreciates the work done by [@Kholia](https://github.com/Kholia) and all the contributors who are listed: [https://github.com/kholia/OSX-KVM/blob/master/CREDITS.md](https://github.com/kholia/OSX-KVM/blob/master/CREDITS.md)
|
This project uses OSX-KVM from https://github.com/kholia/OSX-KVM and fully appreciates the work done by [@Kholia](https://github.com/Kholia) and all the contributors who are listed: [https://github.com/kholia/OSX-KVM/blob/master/CREDITS.md](https://github.com/kholia/OSX-KVM/blob/master/CREDITS.md)
|
||||||
@ -10,7 +12,7 @@ We use a special fork by [Nicholas Sherlock](https://www.nicksherlock.com/) of K
|
|||||||
|
|
||||||
This project now uses the fantastic OpenCore bootloader from the community OpenCore project: https://github.com/acidanthera/OpenCorePkg. You can join their [Subreddit here](https://www.reddit.com/r/hackintosh/)!
|
This project now uses the fantastic OpenCore bootloader from the community OpenCore project: https://github.com/acidanthera/OpenCorePkg. You can join their [Subreddit here](https://www.reddit.com/r/hackintosh/)!
|
||||||
|
|
||||||
## These credits refer to the contributors to this repository:
|
## These credits refer to the legendary contributors to this repository:
|
||||||
|
|
||||||
[@GreeFine](https://github.com/GreeFine) - Readme Typo #9
|
[@GreeFine](https://github.com/GreeFine) - Readme Typo #9
|
||||||
|
|
||||||
@ -72,8 +74,12 @@ This project now uses the fantastic OpenCore bootloader from the community OpenC
|
|||||||
|
|
||||||
[@ggjulio](https://github.com/ggjulio) - Restarting an "auto" container #216
|
[@ggjulio](https://github.com/ggjulio) - Restarting an "auto" container #216
|
||||||
|
|
||||||
|
[@panos](https://github.com/panos) - Improved README #212
|
||||||
|
|
||||||
[@panos](https://github.com/panos) - Made further improvements to the README #219
|
[@panos](https://github.com/panos) - Made further improvements to the README #219
|
||||||
|
|
||||||
|
[@kaoudis](https://github.com/kaoudis) README / troubleshooting docs improvements #235
|
||||||
|
|
||||||
[@a10kiloham](https://github.com/a10kiloham) - Dockerfile for :naked image with VNC support #245
|
[@a10kiloham](https://github.com/a10kiloham) - Dockerfile for :naked image with VNC support #245
|
||||||
|
|
||||||
[@a10kiloham](https://github.com/a10kiloham) - Adding Bluebubbles as an example use case #250
|
[@a10kiloham](https://github.com/a10kiloham) - Adding Bluebubbles as an example use case #250
|
||||||
@ -93,3 +99,17 @@ This project now uses the fantastic OpenCore bootloader from the community OpenC
|
|||||||
[@cybik](https://github.com/cybik) Spice fix #337
|
[@cybik](https://github.com/cybik) Spice fix #337
|
||||||
|
|
||||||
[@Silfalion](https://github.com/Silfalion) - [https://github.com/Silfalion/Iphone_docker_osx_passthrough](https://github.com/Silfalion/Iphone_docker_osx_passthrough)
|
[@Silfalion](https://github.com/Silfalion) - [https://github.com/Silfalion/Iphone_docker_osx_passthrough](https://github.com/Silfalion/Iphone_docker_osx_passthrough)
|
||||||
|
|
||||||
|
[@chirag350](https://github.com/chirag350) use LABEL instead of MAINTAINER since MAINTAINER is deprecated #352
|
||||||
|
|
||||||
|
[@Buthrakaur](https://github.com/Buthrakaur) readme - improve instructions for running on windows #361
|
||||||
|
|
||||||
|
[@TheHackerCoding](https://github.com/TheHackerCoding) Typo in README #367
|
||||||
|
|
||||||
|
[@cameronsteele](https://github.com/cameronsteele) fix Big Sur build example #378
|
||||||
|
|
||||||
|
[@eggplants](https://github.com/eggplants) Fix command to launch sickcodes/docker-osx:auto #366
|
||||||
|
|
||||||
|
[@martinmullins](https://github.com/martinmullins) Notes for mounting an NFS folder from a linux host #392
|
||||||
|
|
||||||
|
[@kimjammer](https://github.com/kimjammer) Readme - Added instructions for using WSLg's built in X11 server #395
|
||||||
|
112
Dockerfile
112
Dockerfile
@ -52,17 +52,17 @@
|
|||||||
# # you will also need to pass the device to the container
|
# # you will also need to pass the device to the container
|
||||||
|
|
||||||
FROM archlinux:base-devel
|
FROM archlinux:base-devel
|
||||||
|
LABEL maintainer='https://twitter.com/sickcodes <https://sick.codes>'
|
||||||
MAINTAINER 'https://twitter.com/sickcodes' <https://sick.codes>
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
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
|
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
RUN perl -i -p -e s/^\#Color/Color$'\n'ParallelDownloads\ =\ 30/g /etc/pacman.conf
|
||||||
ARG RANKMIRRORS
|
ARG RANKMIRRORS
|
||||||
ARG MIRROR_COUNTRY=US
|
ARG MIRROR_COUNTRY=US
|
||||||
ARG MIRROR_COUNT=10
|
ARG MIRROR_COUNT=10
|
||||||
@ -140,32 +140,18 @@ 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 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
|
&& yes | sudo pacman -Scc
|
||||||
|
|
||||||
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=catalina
|
||||||
|
|
||||||
|
RUN make \
|
||||||
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c BaseSystem.img \
|
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c BaseSystem.img \
|
||||||
&& qemu-img create -f qcow2 mac_hdd_ng.img "${SIZE}" \
|
&& rm ./BaseSystem.dmg
|
||||||
&& 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
|
|
||||||
|
|
||||||
WORKDIR /home/arch/OSX-KVM
|
|
||||||
|
|
||||||
ARG LINUX=true
|
ARG LINUX=true
|
||||||
|
|
||||||
@ -189,7 +175,7 @@ RUN touch Launch.sh \
|
|||||||
&& tee -a Launch.sh <<< '[[ "${RAM}" = max ]] && export RAM="$(("$(head -n1 /proc/meminfo | tr -dc "[:digit:]") / 1000000"))"' \
|
&& tee -a Launch.sh <<< '[[ "${RAM}" = max ]] && export RAM="$(("$(head -n1 /proc/meminfo | tr -dc "[:digit:]") / 1000000"))"' \
|
||||||
&& tee -a Launch.sh <<< '[[ "${RAM}" = half ]] && export RAM="$(("$(head -n1 /proc/meminfo | tr -dc "[:digit:]") / 2000000"))"' \
|
&& tee -a Launch.sh <<< '[[ "${RAM}" = half ]] && export RAM="$(("$(head -n1 /proc/meminfo | tr -dc "[:digit:]") / 2000000"))"' \
|
||||||
&& tee -a Launch.sh <<< 'sudo chown -R $(id -u):$(id -g) /dev/snd 2>/dev/null || true' \
|
&& tee -a Launch.sh <<< 'sudo chown -R $(id -u):$(id -g) /dev/snd 2>/dev/null || true' \
|
||||||
&& tee -a Launch.sh <<< 'exec qemu-system-x86_64 -m ${RAM:-2}000 \' \
|
&& tee -a Launch.sh <<< 'exec qemu-system-x86_64 -m ${RAM:-4}000 \' \
|
||||||
&& tee -a Launch.sh <<< '-cpu ${CPU:-Penryn},${CPUID_FLAGS:-vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check,}${BOOT_ARGS} \' \
|
&& tee -a Launch.sh <<< '-cpu ${CPU:-Penryn},${CPUID_FLAGS:-vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check,}${BOOT_ARGS} \' \
|
||||||
&& tee -a Launch.sh <<< '-machine q35,${KVM-"accel=kvm:tcg"} \' \
|
&& tee -a Launch.sh <<< '-machine q35,${KVM-"accel=kvm:tcg"} \' \
|
||||||
&& tee -a Launch.sh <<< '-smp ${CPU_STRING:-${SMP:-4},cores=${CORES:-4}} \' \
|
&& tee -a Launch.sh <<< '-smp ${CPU_STRING:-${SMP:-4},cores=${CORES:-4}} \' \
|
||||||
@ -200,10 +186,10 @@ RUN touch Launch.sh \
|
|||||||
&& tee -a Launch.sh <<< '-smbios type=2 \' \
|
&& 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 <<< '-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 <<< '-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-Catalina/OpenCore.qcow2} \' \
|
&& 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.2,drive=OpenCoreBoot \' \
|
||||||
&& tee -a Launch.sh <<< '-device ide-hd,bus=sata.3,drive=InstallMedia \' \
|
&& 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=${BASESYSTEM_FORMAT:-qcow2} \' \
|
||||||
&& 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 <<< '-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 <<< '-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} \' \
|
&& tee -a Launch.sh <<< '-netdev user,id=net0,hostfwd=tcp::${INTERNAL_SSH_PORT:-10022}-:22,hostfwd=tcp::${SCREEN_SHARE_PORT:-5900}-:5900,${ADDITIONAL_PORTS} \' \
|
||||||
@ -216,33 +202,52 @@ RUN touch Launch.sh \
|
|||||||
# docker exec containerid mv ./Launch-nopicker.sh ./Launch.sh
|
# docker exec containerid mv ./Launch-nopicker.sh ./Launch.sh
|
||||||
# This is now a legacy command.
|
# This is now a legacy command.
|
||||||
# You can use -e BOOTDISK=/bootdisk with -v ./bootdisk.img:/bootdisk
|
# You can use -e BOOTDISK=/bootdisk with -v ./bootdisk.img:/bootdisk
|
||||||
|
|
||||||
|
### LEGACY CODE
|
||||||
RUN grep -v InstallMedia ./Launch.sh > ./Launch-nopicker.sh \
|
RUN grep -v InstallMedia ./Launch.sh > ./Launch-nopicker.sh \
|
||||||
&& chmod +x ./Launch-nopicker.sh \
|
&& chmod +x ./Launch-nopicker.sh \
|
||||||
&& sed -i -e s/OpenCore\.qcow2/OpenCore\-nopicker\.qcow2/ ./Launch-nopicker.sh
|
&& sed -i -e s/OpenCore\.qcow2/OpenCore\-nopicker\.qcow2/ ./Launch-nopicker.sh
|
||||||
|
###
|
||||||
|
|
||||||
USER arch
|
USER arch
|
||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
# 5.13 problem
|
#### libguestfs versioning
|
||||||
|
|
||||||
|
# 5.13+ problem resolved by building the qcow2 against 5.12 using libguestfs-1.44.1-6
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
||||||
|
|
||||||
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
||||||
|
ENV KERNEL_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV KERNEL_HEADERS_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-headers-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV LIBGUESTFS_PACKAGE_URL=https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-6-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
RUN sudo pacman -Rns linux --noconfirm \
|
# fix ad hoc errors from using the arch museum to get libguestfs
|
||||||
; sudo pacman -Syy \
|
RUN sudo sed -i -e 's/^\#RemoteFileSigLevel/RemoteFileSigLevel/g' /etc/pacman.conf
|
||||||
|
|
||||||
|
RUN sudo pacman -Syy \
|
||||||
|
&& sudo pacman -Rns linux --noconfirm \
|
||||||
; sudo pacman -S mkinitcpio --noconfirm \
|
; sudo pacman -S mkinitcpio --noconfirm \
|
||||||
; sudo pacman -U https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst --noconfirm \
|
&& sudo pacman -U "${KERNEL_PACKAGE_URL}" --noconfirm || exit 1 \
|
||||||
; sudo rm -rf /var/tmp/.guestfs-* \
|
&& sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm || exit 1 \
|
||||||
; libguestfs-test-tool
|
&& rm -rf /var/tmp/.guestfs-* \
|
||||||
|
&& yes | sudo pacman -Scc \
|
||||||
|
&& libguestfs-test-tool || exit 1 \
|
||||||
|
&& rm -rf /var/tmp/.guestfs-*
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
# These are hardcoded serials for non-iMessage related research
|
# These are hardcoded serials for non-iMessage related research
|
||||||
# Overwritten by using GENERATE_UNIQUE=true
|
# Overwritten by using GENERATE_UNIQUE=true
|
||||||
# Upstream removed nopicker, so we are adding it back in, at build time
|
# Upstream removed nopicker, so we are adding it back in, at build time
|
||||||
# Once again, this is just for the Docker build so there is a default nopicker image there
|
# Once again, this is just for the Docker build so there is a default nopicker image there
|
||||||
|
|
||||||
|
# libguestfs verbose
|
||||||
|
ENV LIBGUESTFS_DEBUG=1
|
||||||
|
ENV LIBGUESTFS_TRACE=1
|
||||||
|
|
||||||
ARG STOCK_DEVICE_MODEL=iMacPro1,1
|
ARG STOCK_DEVICE_MODEL=iMacPro1,1
|
||||||
ARG STOCK_SERIAL=C02TM2ZBHX87
|
ARG STOCK_SERIAL=C02TM2ZBHX87
|
||||||
ARG STOCK_BOARD_SERIAL=C02717306J9JG361M
|
ARG STOCK_BOARD_SERIAL=C02717306J9JG361M
|
||||||
@ -252,8 +257,8 @@ ARG STOCK_WIDTH=1920
|
|||||||
ARG STOCK_HEIGHT=1080
|
ARG STOCK_HEIGHT=1080
|
||||||
ARG STOCK_MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist
|
ARG STOCK_MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist
|
||||||
ARG STOCK_MASTER_PLIST_URL_NOPICKER=https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-nopicker-custom.plist
|
ARG STOCK_MASTER_PLIST_URL_NOPICKER=https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-nopicker-custom.plist
|
||||||
ARG STOCK_BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2
|
ARG STOCK_BOOTDISK=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2
|
||||||
ARG STOCK_BOOTDISK_NOPICKER=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2
|
ARG STOCK_BOOTDISK_NOPICKER=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2
|
||||||
|
|
||||||
RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
|
RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
|
||||||
--master-plist-url="${STOCK_MASTER_PLIST_URL}" \
|
--master-plist-url="${STOCK_MASTER_PLIST_URL}" \
|
||||||
@ -264,8 +269,8 @@ RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
|
|||||||
--mac-address "${STOCK_MAC_ADDRESS}" \
|
--mac-address "${STOCK_MAC_ADDRESS}" \
|
||||||
--width "${STOCK_WIDTH}" \
|
--width "${STOCK_WIDTH}" \
|
||||||
--height "${STOCK_HEIGHT}" \
|
--height "${STOCK_HEIGHT}" \
|
||||||
--output-bootdisk "${STOCK_BOOTDISK}"
|
--output-bootdisk "${STOCK_BOOTDISK}" || exit 1 \
|
||||||
|
; rm -rf /var/tmp/.guestfs-*
|
||||||
|
|
||||||
RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
|
RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
|
||||||
--master-plist-url="${STOCK_MASTER_PLIST_URL_NOPICKER}" \
|
--master-plist-url="${STOCK_MASTER_PLIST_URL_NOPICKER}" \
|
||||||
@ -276,14 +281,23 @@ RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
|
|||||||
--mac-address "${STOCK_MAC_ADDRESS}" \
|
--mac-address "${STOCK_MAC_ADDRESS}" \
|
||||||
--width "${STOCK_WIDTH}" \
|
--width "${STOCK_WIDTH}" \
|
||||||
--height "${STOCK_HEIGHT}" \
|
--height "${STOCK_HEIGHT}" \
|
||||||
--output-bootdisk "${STOCK_BOOTDISK_NOPICKER}"
|
--output-bootdisk "${STOCK_BOOTDISK_NOPICKER}" || exit 1 \
|
||||||
|
; rm -rf /var/tmp/.guestfs-*
|
||||||
|
|
||||||
|
### symlink the old directory as upstream has renamed a directory. Symlinking purely for backwards compatability!
|
||||||
|
RUN ln -s /home/arch/OSX-KVM/OpenCore /home/arch/OSX-KVM/OpenCore-Catalina || true
|
||||||
|
####
|
||||||
|
|
||||||
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
||||||
|
|
||||||
# env -e ADDITIONAL_PORTS with a comma
|
# env -e ADDITIONAL_PORTS with a comma
|
||||||
# for example, -e ADDITIONAL_PORTS=hostfwd=tcp::23-:23,
|
# for example, -e ADDITIONAL_PORTS=hostfwd=tcp::23-:23,
|
||||||
ENV ADDITIONAL_PORTS=
|
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
|
# add additional QEMU boot arguments
|
||||||
ENV BOOT_ARGS=
|
ENV BOOT_ARGS=
|
||||||
|
|
||||||
@ -309,7 +323,7 @@ ENV IMAGE_FORMAT=qcow2
|
|||||||
|
|
||||||
ENV KVM='accel=kvm:tcg'
|
ENV KVM='accel=kvm:tcg'
|
||||||
|
|
||||||
ENV MASTER_PLIST_URL="https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-nopicker-custom.plist"
|
ENV MASTER_PLIST_URL="https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist"
|
||||||
|
|
||||||
# ENV NETWORKING=e1000-82545em
|
# ENV NETWORKING=e1000-82545em
|
||||||
ENV NETWORKING=vmxnet3
|
ENV NETWORKING=vmxnet3
|
||||||
@ -318,7 +332,7 @@ ENV NETWORKING=vmxnet3
|
|||||||
ENV NOPICKER=false
|
ENV NOPICKER=false
|
||||||
|
|
||||||
# dynamic RAM options for runtime
|
# dynamic RAM options for runtime
|
||||||
ENV RAM=3
|
ENV RAM=4
|
||||||
# ENV RAM=max
|
# ENV RAM=max
|
||||||
# ENV RAM=half
|
# ENV RAM=half
|
||||||
|
|
||||||
@ -327,10 +341,6 @@ ENV RAM=3
|
|||||||
ENV WIDTH=1920
|
ENV WIDTH=1920
|
||||||
ENV HEIGHT=1080
|
ENV HEIGHT=1080
|
||||||
|
|
||||||
# libguestfs verbose
|
|
||||||
ENV LIBGUESTFS_DEBUG=1
|
|
||||||
ENV LIBGUESTFS_TRACE=1
|
|
||||||
|
|
||||||
VOLUME ["/tmp/.X11-unix"]
|
VOLUME ["/tmp/.X11-unix"]
|
||||||
|
|
||||||
# check if /image is a disk image or a directory. This allows you to optionally use -v disk.img:/image
|
# check if /image is a disk image or a directory. This allows you to optionally use -v disk.img:/image
|
||||||
@ -349,16 +359,16 @@ VOLUME ["/tmp/.X11-unix"]
|
|||||||
# /bootdisk is a useful persistent place to store the 15Mb serial number bootdisk.
|
# /bootdisk is a useful persistent place to store the 15Mb serial number bootdisk.
|
||||||
|
|
||||||
# if you don't set any of the above:
|
# if you don't set any of the above:
|
||||||
# the default serial numbers are already contained in ./OpenCore-Catalina/OpenCore.qcow2
|
# the default serial numbers are already contained in ./OpenCore/OpenCore.qcow2
|
||||||
# And the default serial numbers
|
# And the default serial numbers
|
||||||
|
|
||||||
CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
||||||
; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
||||||
; [[ "${NOPICKER}" == true ]] && { \
|
; [[ "${NOPICKER}" == true ]] && { \
|
||||||
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
||||||
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \
|
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
||||||
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
||||||
--master-plist-url="${MASTER_PLIST_URL}" \
|
--master-plist-url="${MASTER_PLIST_URL}" \
|
||||||
@ -367,7 +377,7 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
--bootdisks \
|
--bootdisks \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
--output-env "${ENV:=/env}" \
|
--output-env "${ENV:=/env}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
||||||
@ -381,7 +391,7 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
--mac-address "${MAC_ADDRESS}" \
|
--mac-address "${MAC_ADDRESS}" \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; ./enable-ssh.sh && /bin/bash -c ./Launch.sh
|
; ./enable-ssh.sh && /bin/bash -c ./Launch.sh
|
||||||
|
|
||||||
|
@ -92,19 +92,33 @@ USER arch
|
|||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
# 5.13 problem
|
|
||||||
|
#### libguestfs versioning
|
||||||
|
|
||||||
|
# 5.13+ problem resolved by building the qcow2 against 5.12 using libguestfs-1.44.1-6
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
||||||
|
|
||||||
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
||||||
|
ENV KERNEL_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV KERNEL_HEADERS_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-headers-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV LIBGUESTFS_PACKAGE_URL=https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-6-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
RUN sudo pacman -Rns linux --noconfirm \
|
# fix ad hoc errors from using the arch museum to get libguestfs
|
||||||
; sudo pacman -Syy \
|
RUN sudo sed -i -e 's/^\#RemoteFileSigLevel/RemoteFileSigLevel/g' /etc/pacman.conf
|
||||||
|
|
||||||
|
RUN sudo pacman -Syy \
|
||||||
|
&& sudo pacman -Rns linux --noconfirm \
|
||||||
; sudo pacman -S mkinitcpio --noconfirm \
|
; sudo pacman -S mkinitcpio --noconfirm \
|
||||||
; sudo pacman -U https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst --noconfirm \
|
&& sudo pacman -U "${KERNEL_PACKAGE_URL}" --noconfirm || exit 1 \
|
||||||
; sudo rm -rf /var/tmp/.guestfs-* \
|
&& sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm || exit 1 \
|
||||||
; libguestfs-test-tool
|
&& rm -rf /var/tmp/.guestfs-* \
|
||||||
|
&& yes | sudo pacman -Scc \
|
||||||
|
&& libguestfs-test-tool || exit 1 \
|
||||||
|
&& rm -rf /var/tmp/.guestfs-*
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /home/arch/OSX-KVM
|
WORKDIR /home/arch/OSX-KVM
|
||||||
|
|
||||||
@ -135,6 +149,14 @@ RUN if [[ "${COMPLETE}" ]]; then \
|
|||||||
&& wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \
|
&& wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \
|
||||||
; fi
|
; fi
|
||||||
|
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
# symlink the old directory, for redundancy
|
||||||
|
RUN ln -s /home/arch/OSX-KVM/OpenCore /home/arch/OSX-KVM/OpenCore-Catalina || true
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
||||||
|
|
||||||
ENV ADDITIONAL_PORTS=
|
ENV ADDITIONAL_PORTS=
|
||||||
@ -200,9 +222,9 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
||||||
; [[ "${NOPICKER}" == true ]] && { \
|
; [[ "${NOPICKER}" == true ]] && { \
|
||||||
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
||||||
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \
|
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
||||||
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
||||||
--master-plist-url="${MASTER_PLIST_URL}" \
|
--master-plist-url="${MASTER_PLIST_URL}" \
|
||||||
@ -211,7 +233,7 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
--bootdisks \
|
--bootdisks \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
--output-env "${ENV:=/env}" \
|
--output-env "${ENV:=/env}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
||||||
@ -225,7 +247,7 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
--mac-address "${MAC_ADDRESS}" \
|
--mac-address "${MAC_ADDRESS}" \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; { [[ "${DISPLAY}" = ':99' ]] || [[ "${HEADLESS}" == true ]] ; } && { \
|
; { [[ "${DISPLAY}" = ':99' ]] || [[ "${HEADLESS}" == true ]] ; } && { \
|
||||||
nohup Xvfb :99 -screen 0 1920x1080x16 \
|
nohup Xvfb :99 -screen 0 1920x1080x16 \
|
||||||
|
@ -39,13 +39,32 @@ RUN qemu-img create -f qcow2 /home/arch/OSX-KVM/mac_hdd_ng.img "${SIZE}"
|
|||||||
|
|
||||||
WORKDIR /home/arch/OSX-KVM
|
WORKDIR /home/arch/OSX-KVM
|
||||||
|
|
||||||
|
#### libguestfs versioning
|
||||||
|
|
||||||
|
# 5.13+ problem resolved by building the qcow2 against 5.12 using libguestfs-1.44.1-6
|
||||||
|
|
||||||
|
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
||||||
|
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
||||||
|
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
||||||
|
ENV KERNEL_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV KERNEL_HEADERS_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-headers-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV LIBGUESTFS_PACKAGE_URL=https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-6-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
ARG LINUX=true
|
ARG LINUX=true
|
||||||
|
|
||||||
# required to use libguestfs inside a docker container, to create bootdisks for docker-osx on-the-fly
|
# required to use libguestfs inside a docker container, to create bootdisks for docker-osx on-the-fly
|
||||||
RUN if [[ "${LINUX}" == true ]]; then \
|
RUN if [[ "${LINUX}" == true ]]; then \
|
||||||
sudo pacman -Syu linux libguestfs --noconfirm \
|
sudo pacman -U "${KERNEL_PACKAGE_URL}" --noconfirm \
|
||||||
|
; sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm \
|
||||||
|
; sudo pacman -U "${KERNEL_HEADERS_PACKAGE_URL}" --noconfirm \
|
||||||
|
; sudo pacman -S mkinitcpio --noconfirm \
|
||||||
|
; sudo libguestfs-test-tool \
|
||||||
|
; sudo rm -rf /var/tmp/.guestfs-* \
|
||||||
; fi
|
; fi
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
|
||||||
# optional --build-arg to change branches for testing
|
# optional --build-arg to change branches for testing
|
||||||
ARG BRANCH=master
|
ARG BRANCH=master
|
||||||
ARG REPO='https://github.com/sickcodes/Docker-OSX.git'
|
ARG REPO='https://github.com/sickcodes/Docker-OSX.git'
|
||||||
@ -73,7 +92,7 @@ RUN touch Launch.sh \
|
|||||||
&& tee -a Launch.sh <<< '-smbios type=2 \' \
|
&& 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 <<< '-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 <<< '-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-Catalina/OpenCore.qcow2} \' \
|
&& 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.2,drive=OpenCoreBoot \' \
|
||||||
&& tee -a Launch.sh <<< '-device ide-hd,bus=sata.3,drive=InstallMedia \' \
|
&& 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=qcow2 \' \
|
||||||
@ -97,19 +116,32 @@ USER arch
|
|||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
# 5.13 problem
|
|
||||||
|
#### libguestfs versioning
|
||||||
|
|
||||||
|
# 5.13+ problem resolved by building the qcow2 against 5.12 using libguestfs-1.44.1-6
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
||||||
|
|
||||||
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
||||||
|
ENV KERNEL_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV KERNEL_HEADERS_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-headers-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV LIBGUESTFS_PACKAGE_URL=https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-6-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
RUN sudo pacman -Rns linux --noconfirm \
|
RUN sudo pacman -Syy \
|
||||||
; sudo pacman -Syy \
|
&& sudo pacman -Rns linux --noconfirm \
|
||||||
; sudo pacman -S mkinitcpio --noconfirm \
|
; sudo pacman -S mkinitcpio --noconfirm \
|
||||||
; sudo pacman -U https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst --noconfirm \
|
&& sudo pacman -U "${KERNEL_PACKAGE_URL}" --noconfirm \
|
||||||
; sudo rm -rf /var/tmp/.guestfs-* \
|
&& sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm \
|
||||||
; libguestfs-test-tool
|
&& rm -rf /var/tmp/.guestfs-* \
|
||||||
|
; libguestfs-test-tool || exit 1
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
# symlink the old directory, for redundancy
|
||||||
|
RUN ln -s /home/arch/OSX-KVM/OpenCore /home/arch/OSX-KVM/OpenCore-Catalina || true
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
||||||
|
|
||||||
@ -182,16 +214,16 @@ VOLUME ["/tmp/.X11-unix"]
|
|||||||
# /bootdisk is a useful persistent place to store the 15Mb serial number bootdisk.
|
# /bootdisk is a useful persistent place to store the 15Mb serial number bootdisk.
|
||||||
|
|
||||||
# if you don't set any of the above:
|
# if you don't set any of the above:
|
||||||
# the default serial numbers are already contained in ./OpenCore-Catalina/OpenCore.qcow2
|
# the default serial numbers are already contained in ./OpenCore/OpenCore.qcow2
|
||||||
# And the default serial numbers
|
# And the default serial numbers
|
||||||
|
|
||||||
CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
||||||
; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
||||||
; [[ "${NOPICKER}" == true ]] && { \
|
; [[ "${NOPICKER}" == true ]] && { \
|
||||||
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
||||||
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \
|
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
||||||
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
||||||
--master-plist-url="${MASTER_PLIST_URL}" \
|
--master-plist-url="${MASTER_PLIST_URL}" \
|
||||||
@ -200,7 +232,7 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
--bootdisks \
|
--bootdisks \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
--output-env "${ENV:=/env}" \
|
--output-env "${ENV:=/env}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
||||||
@ -214,7 +246,7 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
--mac-address "${MAC_ADDRESS}" \
|
--mac-address "${MAC_ADDRESS}" \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; ./enable-ssh.sh && /bin/bash -c ./Launch.sh
|
; ./enable-ssh.sh && /bin/bash -c ./Launch.sh
|
||||||
|
|
||||||
|
@ -81,19 +81,27 @@ USER arch
|
|||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
# 5.13 problem
|
#### libguestfs versioning
|
||||||
|
|
||||||
|
# 5.13+ problem resolved by building the qcow2 against 5.12 using libguestfs-1.44.1-6
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
||||||
|
|
||||||
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
||||||
|
ENV KERNEL_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV KERNEL_HEADERS_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-headers-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV LIBGUESTFS_PACKAGE_URL=https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-6-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
RUN sudo pacman -Rns linux --noconfirm \
|
RUN sudo pacman -Syy \
|
||||||
; sudo pacman -Syy \
|
&& sudo pacman -Rns linux --noconfirm \
|
||||||
; sudo pacman -S mkinitcpio --noconfirm \
|
; sudo pacman -S mkinitcpio --noconfirm \
|
||||||
; sudo pacman -U https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst --noconfirm \
|
&& sudo pacman -U "${KERNEL_PACKAGE_URL}" --noconfirm \
|
||||||
; sudo rm -rf /var/tmp/.guestfs-* \
|
&& sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm \
|
||||||
; libguestfs-test-tool
|
&& rm -rf /var/tmp/.guestfs-* \
|
||||||
|
; libguestfs-test-tool || exit 1
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /home/arch/OSX-KVM
|
WORKDIR /home/arch/OSX-KVM
|
||||||
|
|
||||||
@ -107,6 +115,13 @@ RUN mkdir -p ~/.ssh \
|
|||||||
&& tee -a ~/.ssh/config <<< ' StrictHostKeyChecking no' \
|
&& tee -a ~/.ssh/config <<< ' StrictHostKeyChecking no' \
|
||||||
&& tee -a ~/.ssh/config <<< ' UserKnownHostsFile=/dev/null'
|
&& tee -a ~/.ssh/config <<< ' UserKnownHostsFile=/dev/null'
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
# symlink the old directory, for redundancy
|
||||||
|
RUN ln -s /home/arch/OSX-KVM/OpenCore /home/arch/OSX-KVM/OpenCore-Catalina || true
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
||||||
|
|
||||||
ENV ADDITIONAL_PORTS=
|
ENV ADDITIONAL_PORTS=
|
||||||
@ -165,9 +180,9 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
; } \
|
; } \
|
||||||
; [[ "${NOPICKER}" == true ]] && { \
|
; [[ "${NOPICKER}" == true ]] && { \
|
||||||
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
||||||
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \
|
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
||||||
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
||||||
--master-plist-url="${MASTER_PLIST_URL}" \
|
--master-plist-url="${MASTER_PLIST_URL}" \
|
||||||
@ -176,7 +191,7 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
--bootdisks \
|
--bootdisks \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
--output-env "${ENV:=/env}" \
|
--output-env "${ENV:=/env}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
||||||
@ -190,6 +205,6 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
--mac-address "${MAC_ADDRESS}" \
|
--mac-address "${MAC_ADDRESS}" \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; ./enable-ssh.sh && /bin/bash -c ./Launch.sh
|
; ./enable-ssh.sh && /bin/bash -c ./Launch.sh
|
||||||
|
@ -73,19 +73,32 @@ USER arch
|
|||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
# 5.13 problem
|
#### libguestfs versioning
|
||||||
|
|
||||||
|
# 5.13+ problem resolved by building the qcow2 against 5.12 using libguestfs-1.44.1-6
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
||||||
|
|
||||||
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
||||||
|
ENV KERNEL_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV KERNEL_HEADERS_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-headers-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV LIBGUESTFS_PACKAGE_URL=https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-6-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
RUN sudo pacman -Rns linux --noconfirm \
|
# fix ad hoc errors from using the arch museum to get libguestfs
|
||||||
; sudo pacman -Syy \
|
RUN sudo sed -i -e 's/^\#RemoteFileSigLevel/RemoteFileSigLevel/g' /etc/pacman.conf
|
||||||
|
|
||||||
|
RUN sudo pacman -Syy \
|
||||||
|
&& sudo pacman -Rns linux --noconfirm \
|
||||||
; sudo pacman -S mkinitcpio --noconfirm \
|
; sudo pacman -S mkinitcpio --noconfirm \
|
||||||
; sudo pacman -U https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst --noconfirm \
|
&& sudo pacman -U "${KERNEL_PACKAGE_URL}" --noconfirm || exit 1 \
|
||||||
; sudo rm -rf /var/tmp/.guestfs-* \
|
&& sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm || exit 1 \
|
||||||
; libguestfs-test-tool
|
&& rm -rf /var/tmp/.guestfs-* \
|
||||||
|
&& yes | sudo pacman -Scc \
|
||||||
|
&& libguestfs-test-tool || exit 1 \
|
||||||
|
&& rm -rf /var/tmp/.guestfs-*
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /home/arch/OSX-KVM
|
WORKDIR /home/arch/OSX-KVM
|
||||||
|
|
||||||
@ -116,6 +129,13 @@ RUN if [[ "${COMPLETE}" ]]; then \
|
|||||||
&& wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \
|
&& wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \
|
||||||
; fi
|
; fi
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
# symlink the old directory, for redundancy
|
||||||
|
RUN ln -s /home/arch/OSX-KVM/OpenCore /home/arch/OSX-KVM/OpenCore-Catalina || true
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
||||||
|
|
||||||
ENV ADDITIONAL_PORTS=
|
ENV ADDITIONAL_PORTS=
|
||||||
@ -181,9 +201,9 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
||||||
; [[ "${NOPICKER}" == true ]] && { \
|
; [[ "${NOPICKER}" == true ]] && { \
|
||||||
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
||||||
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \
|
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
||||||
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
||||||
--master-plist-url="${MASTER_PLIST_URL}" \
|
--master-plist-url="${MASTER_PLIST_URL}" \
|
||||||
@ -192,7 +212,7 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
--bootdisks \
|
--bootdisks \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
--output-env "${ENV:=/env}" \
|
--output-env "${ENV:=/env}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
||||||
@ -206,7 +226,7 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
--mac-address "${MAC_ADDRESS}" \
|
--mac-address "${MAC_ADDRESS}" \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; { [[ "${DISPLAY}" = ':99' ]] || [[ "${HEADLESS}" == true ]] ; } && { \
|
; { [[ "${DISPLAY}" = ':99' ]] || [[ "${HEADLESS}" == true ]] ; } && { \
|
||||||
nohup Xvfb :99 -screen 0 1920x1080x16 \
|
nohup Xvfb :99 -screen 0 1920x1080x16 \
|
||||||
|
198
README.md
198
README.md
@ -4,13 +4,18 @@
|
|||||||
|
|
||||||
Run Mac OS X in Docker with near-native performance! X11 Forwarding! iMessage security research! iPhone USB working! macOS in a Docker container!
|
Run Mac OS X in Docker with near-native performance! X11 Forwarding! iMessage security research! iPhone USB working! macOS in a Docker container!
|
||||||
|
|
||||||
|
Conduct Security Research on macOS using both Linux & Windows!
|
||||||
|
|
||||||
# Docker-OSX now has a Discord server & Telegram!
|
# Docker-OSX now has a Discord server & Telegram!
|
||||||
|
|
||||||
The Discord is active on #docker-osx and anyone is welcome to come and ask questions, ideas, etc.
|
The Discord is active on #docker-osx and anyone is welcome to come and ask questions, ideas, etc.
|
||||||
|
|
||||||
[](https://discord.gg/mx8pPw39Yg)
|
<p align="center">
|
||||||
|
<a href="https://hub.docker.com/r/sickcodes/docker-osx"><img src="https://dockeri.co/image/sickcodes/docker-osx"/></a><a href="https://discord.gg/sickchat"><a href="https://discord.gg/sickchat" target="_blank"><img src="https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/discord-logo.svg"></a></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
### Click to join the Discord server [https://discord.gg/mx8pPw39Yg](https://discord.gg/mx8pPw39Yg)
|
|
||||||
|
### Click to join the Discord server [https://discord.gg/sickchat](https://discord.gg/sickchat)
|
||||||
|
|
||||||
### Click to join the Telegram server [https://t.me/sickcodeschat](https://t.me/sickcodeschat)
|
### Click to join the Telegram server [https://t.me/sickcodeschat](https://t.me/sickcodeschat)
|
||||||
|
|
||||||
@ -34,14 +39,20 @@ Extra special thanks to the OpenCore team over at: https://github.com/acidanther
|
|||||||
|
|
||||||
If you like this project, consider contributing here or upstream!
|
If you like this project, consider contributing here or upstream!
|
||||||
|
|
||||||
<a href="https://hub.docker.com/r/sickcodes/docker-osx"><img src="https://dockeri.co/image/sickcodes/docker-osx"/></a>
|
|
||||||
|
|
||||||
## Quick Start Docker-OSX
|
## Quick Start Docker-OSX
|
||||||
|
|
||||||
|
Video setup tutorial is also available here: https://www.youtube.com/watch?v=wLezYl77Ll8
|
||||||
|
|
||||||
|
**Windows users:** [click here to see the notes below](#id-like-to-run-docker-osx-on-windows)!
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://www.youtube.com/watch?v=wLezYl77Ll8" target="_blank"><img src="https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/Youtube-Screenshot-Docker-OSX-Setup.png"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
First time here? try [initial setup](#initial-setup), otherwise try the instructions below to use either Catalina or Big Sur.
|
First time here? try [initial setup](#initial-setup), otherwise try the instructions below to use either Catalina or Big Sur.
|
||||||
|
|
||||||
## Any questions, ideas, or just want to hang out?
|
## Any questions, ideas, or just want to hang out?
|
||||||
# [https://discord.gg/mx8pPw39Yg](https://discord.gg/mx8pPw39Yg)
|
# [https://discord.gg/sickchat](https://discord.gg/sickchat)
|
||||||
|
|
||||||
### Catalina [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
### Catalina [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
@ -65,7 +76,7 @@ docker run -it \
|
|||||||
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
||||||
sickcodes/docker-osx:big-sur
|
sickcodes/docker-osx:big-sur
|
||||||
|
|
||||||
# docker build -t docker-osx -e VERSION='Big Sur' .
|
# docker build -t docker-osx --build-arg SHORTNAME=big-sur .
|
||||||
```
|
```
|
||||||
|
|
||||||
### Monterey [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
### Monterey [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
@ -81,7 +92,7 @@ docker run -it \
|
|||||||
-e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \
|
-e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \
|
||||||
sickcodes/docker-osx:monterey
|
sickcodes/docker-osx:monterey
|
||||||
|
|
||||||
# docker build -t docker-osx -f Dockerfile.monterey .
|
# docker build -t docker-osx --build-arg SHORTNAME=monterey .
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Run Catalina Pre-Installed [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
#### Run Catalina Pre-Installed [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
@ -96,12 +107,45 @@ docker run -it \
|
|||||||
-p 50922:10022 \
|
-p 50922:10022 \
|
||||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||||
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
||||||
|
-e GENERATE_UNIQUE=true \
|
||||||
sickcodes/docker-osx:auto
|
sickcodes/docker-osx:auto
|
||||||
|
|
||||||
# username is user
|
# username is user
|
||||||
# passsword is alpine
|
# passsword is alpine
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Older Systems
|
||||||
|
|
||||||
|
### High Sierra [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
|
||||||
|
docker run -it \
|
||||||
|
--device /dev/kvm \
|
||||||
|
-p 50922:10022 \
|
||||||
|
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||||
|
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
||||||
|
sickcodes/docker-osx:high-sierra
|
||||||
|
|
||||||
|
# docker build -t docker-osx --build-arg SHORTNAME=high-sierra .
|
||||||
|
```
|
||||||
|
|
||||||
|
### Mojave [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
|
||||||
|
docker run -it \
|
||||||
|
--device /dev/kvm \
|
||||||
|
-p 50922:10022 \
|
||||||
|
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||||
|
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
||||||
|
sickcodes/docker-osx:mojave
|
||||||
|
|
||||||
|
# docker build -t docker-osx --build-arg SHORTNAME=mojave .
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### Download the image manually and use it in Docker
|
#### Download the image manually and use it in Docker
|
||||||
|
|
||||||
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
@ -245,31 +289,44 @@ SEE commands in [https://github.com/sickcodes/osx-optimizer](https://github.com/
|
|||||||
|
|
||||||
## Important notices:
|
## Important notices:
|
||||||
|
|
||||||
**2021-09-09** - Bootdisks at runtime required for Monterey!
|
**2021-11-14** - Added High Sierra, Mojave
|
||||||
|
|
||||||
Pick one of these:
|
Pick one of these while **building**, irrelevant when using docker pull:
|
||||||
```
|
```
|
||||||
-e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \
|
--build-arg SHORTNAME=high-sierra
|
||||||
|
--build-arg SHORTNAME=mojave
|
||||||
-e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-nopicker-custom.plist' \
|
--build-arg SHORTNAME=catalina
|
||||||
|
--build-arg SHORTNAME=big-sur
|
||||||
|
--build-arg SHORTNAME=monterey
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Technical details
|
## Technical details
|
||||||
|
|
||||||
There currently five images, each with different use cases (explained [below](#container-images)):
|
There currently multiple images, each with different use cases (explained [below](#container-images)):
|
||||||
|
|
||||||
|
- High Sierra
|
||||||
|
- Mojave
|
||||||
- Catalina
|
- Catalina
|
||||||
- Big Sur
|
- Big Sur
|
||||||
|
- Monterey
|
||||||
- Auto (pre-made Catalina)
|
- Auto (pre-made Catalina)
|
||||||
- Naked (use your own .img)
|
- Naked (use your own .img)
|
||||||
- Naked-Auto (user your own .img and SSH in)
|
- Naked-Auto (user your own .img and SSH in)
|
||||||
|
|
||||||
Catalina make your own image:
|
High Sierra:
|
||||||
|
|
||||||
|
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
|
Mojave:
|
||||||
|
|
||||||
|
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
|
Catalina:
|
||||||
|
|
||||||
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
Big-Sur make your own image:
|
Big-Sur:
|
||||||
|
|
||||||
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
@ -277,25 +334,26 @@ Monterey make your own image:
|
|||||||
|
|
||||||
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
Pre-made system by [Sick.Codes](https://sick.codes): username: `user`, password: `alpine`
|
Pre-made **Catalina** system by [Sick.Codes](https://sick.codes): username: `user`, password: `alpine`
|
||||||
|
|
||||||
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
Bring-your-own-image setup (use any of the above first):
|
Naked: Bring-your-own-image setup (use any of the above first):
|
||||||
|
|
||||||
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
Same as above but with `-e USERNAME` & `-e PASSWORD` and `-e OSX_COMMANDS="put your commands here"`
|
Naked Auto: same as above but with `-e USERNAME` & `-e PASSWORD` and `-e OSX_COMMANDS="put your commands here"`
|
||||||
|
|
||||||
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
## Capabilities
|
## Capabilities
|
||||||
- use iPhone OSX KVM on Linux using usbfluxd!
|
- use iPhone OSX KVM on Linux using [usbfluxd](https://github.com/corellium/usbfluxd)!
|
||||||
- macOS Monterey!
|
- macOS Monterey VM on Linux!
|
||||||
- Folder sharing
|
- Folder sharing-
|
||||||
|
- USB passthrough (hotplug too)
|
||||||
- SSH enabled (`localhost:50922`)
|
- SSH enabled (`localhost:50922`)
|
||||||
- VNC enabled (`localhost:8888`) if using ./vnc version
|
- VNC enabled (`localhost:8888`) if using ./vnc version
|
||||||
- [serial number generator!](https://github.com/sickcodes/osx-serial-generator)
|
- iMessage security research via [serial number generator!](https://github.com/sickcodes/osx-serial-generator)
|
||||||
- X11 forwarding is enabled
|
- X11 forwarding is enabled
|
||||||
- runs on top of QEMU + KVM
|
- runs on top of QEMU + KVM
|
||||||
- supports Big Sur, custom images, Xvfb headless mode
|
- supports Big Sur, custom images, Xvfb headless mode
|
||||||
@ -303,9 +361,9 @@ Same as above but with `-e USERNAME` & `-e PASSWORD` and `-e OSX_COMMANDS="put y
|
|||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
- 20GB disk space for bare minimum installation
|
- 20GB+++ disk space for bare minimum installation (50GB if using Xcode)
|
||||||
- virtualization should be enabled in your BIOS settings
|
- virtualization should be enabled in your BIOS settings
|
||||||
- a kvm-capable host
|
- a x86_64 kvm-capable host
|
||||||
- at least 50 GBs for `:auto` (half for the base image, half for your runtime image
|
- at least 50 GBs for `:auto` (half for the base image, half for your runtime image
|
||||||
|
|
||||||
### TODO
|
### TODO
|
||||||
@ -389,6 +447,9 @@ Create your personal image using `:latest` or `big-sur`. Then, pull the image ou
|
|||||||
- `sickcodes/docker-osx:big-sur` - [I want to run Big Sur.](#quick-start-docker-osx)
|
- `sickcodes/docker-osx:big-sur` - [I want to run Big Sur.](#quick-start-docker-osx)
|
||||||
- `sickcodes/docker-osx:monterey` - [I want to run Monterey.](#quick-start-docker-osx)
|
- `sickcodes/docker-osx:monterey` - [I want to run Monterey.](#quick-start-docker-osx)
|
||||||
|
|
||||||
|
- `sickcodes/docker-osx:high-sierra` - I want to run High Sierra.
|
||||||
|
- `sickcodes/docker-osx:mojave` - I want to run Mojave.
|
||||||
|
|
||||||
## Initial setup
|
## Initial setup
|
||||||
Before you do anything else, you will need to turn on hardware virtualization in your BIOS. Precisely how will depend on your particular machine (and BIOS), but it should be straightforward.
|
Before you do anything else, you will need to turn on hardware virtualization in your BIOS. Precisely how will depend on your particular machine (and BIOS), but it should be straightforward.
|
||||||
|
|
||||||
@ -416,9 +477,33 @@ echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs
|
|||||||
sudo modprobe kvm
|
sudo modprobe kvm
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### I'd like to run Docker-OSX on Windows
|
||||||
|
|
||||||
|
Running Docker-OSX on Windows is now possible using WSL2 (Windows + Ubuntu Subsystem!).
|
||||||
|
|
||||||
|
Ensure KVM is enabled (Windows 11 is required) and `x11-apps` is installed.
|
||||||
|
|
||||||
|
First, setup [Docker for Windows following the official Docker guide](https://docs.docker.com/desktop/windows/wsl/#download).
|
||||||
|
|
||||||
|
You need the official Docker Desktop exe: [https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe](https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe).
|
||||||
|
|
||||||
|
#### Using WSLg (WSL GUI which includes Wayland or X applications to run)
|
||||||
|
|
||||||
|
[https://github.com/microsoft/wslg](https://github.com/microsoft/wslg)
|
||||||
|
|
||||||
|
To use WSLg's built in X11 server, change these two lines to point Docker-OSX to it.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
-e "DISPLAY=${DISPLAY:-:0}" \
|
||||||
|
-v /mnt/wslg/.X11-unix:/tmp/.X11-unix \
|
||||||
|
```
|
||||||
|
|
||||||
|
See more in-depth discussion about Docker-OSX on Windows [here](https://github.com/sickcodes/Docker-OSX/issues/17) and [here](https://github.com/sickcodes/Docker-OSX/issues/60).
|
||||||
|
|
||||||
|
|
||||||
## Additional boot instructions for when you are [creating your container](#container-creation-examples)
|
## Additional boot instructions for when you are [creating your container](#container-creation-examples)
|
||||||
|
|
||||||
- Boot the macOS Base System
|
- Boot the macOS Base System (Press Enter)
|
||||||
|
|
||||||
- Click `Disk Utility`
|
- Click `Disk Utility`
|
||||||
|
|
||||||
@ -429,6 +514,8 @@ sudo modprobe kvm
|
|||||||
|
|
||||||
- Click `Reinstall macOS`
|
- Click `Reinstall macOS`
|
||||||
|
|
||||||
|
- The system may require multiple reboots during installation
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### Routine checks
|
### Routine checks
|
||||||
@ -479,7 +566,9 @@ This will use all available cores; adjust accordingly to the day of the week:
|
|||||||
|
|
||||||
This will use `-smp $(nproc)`
|
This will use `-smp $(nproc)`
|
||||||
|
|
||||||
#### Confirm your user is part of the the Docker group, KVM group, libvirt group
|
### Confirm your user is part of the the Docker group, KVM group, libvirt group
|
||||||
|
|
||||||
|
#### Add yourself to the Docker group
|
||||||
|
|
||||||
If you use `sudo dockerd` or dockerd is controlled by systemd/systemctl, then you must be in the Docker group.
|
If you use `sudo dockerd` or dockerd is controlled by systemd/systemctl, then you must be in the Docker group.
|
||||||
If you are not in the Docker group:
|
If you are not in the Docker group:
|
||||||
@ -499,17 +588,17 @@ See also: [initial setup](#initial-setup).
|
|||||||
#### Is the docker daemon enabled?
|
#### Is the docker daemon enabled?
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# run ad hoc
|
||||||
|
sudo dockerd
|
||||||
|
|
||||||
|
# or daemonize it
|
||||||
|
sudo nohup dockerd &
|
||||||
|
|
||||||
# enable it in systemd (it will persist across reboots this way)
|
# enable it in systemd (it will persist across reboots this way)
|
||||||
sudo systemctl enable --now docker
|
sudo systemctl enable --now docker
|
||||||
|
|
||||||
# or just start it as your user with systemd instead of enabling it
|
# or just start it as your user with systemd instead of enabling it
|
||||||
systemctl start docker
|
systemctl start docker
|
||||||
|
|
||||||
# or run ad hoc
|
|
||||||
sudo dockerd
|
|
||||||
|
|
||||||
# or daemonize it
|
|
||||||
sudo nohup dockerd &
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## More Questions and Answers
|
## More Questions and Answers
|
||||||
@ -754,7 +843,37 @@ docker run -it \
|
|||||||
# sudo -S mount_9p hostshare
|
# sudo -S mount_9p hostshare
|
||||||
|
|
||||||
```
|
```
|
||||||
|
### Share Linux NFS Drive into macOS
|
||||||
|
|
||||||
|
To share a folder using NFS, setup a folder for on the host machine, for example, `/srv/nfs/share` and then append to `/etc/exports`:
|
||||||
|
```bash
|
||||||
|
/srv/nfs/share 127.0.0.1/0(insecure,rw,all_squash,anonuid=1000,anongid=985,no_subtree_check)
|
||||||
|
```
|
||||||
|
|
||||||
|
You may need to reload exports now, which will begin sharing that directory.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# reload shared folders
|
||||||
|
sudo exportfs -arv
|
||||||
|
```
|
||||||
|
|
||||||
|
[Source & Explanation](https://serverfault.com/questions/716350/mount-nfs-volume-on-ubuntu-linux-server-from-macos-client)
|
||||||
|
|
||||||
|
Give permissions on the shared folder for the `anonuid` and `anongid`, where `anonuid` and `anongid` matches that of your linux user; `id -u`
|
||||||
|
|
||||||
|
`id -u ; id -g` will print `userid:groupid`
|
||||||
|
```
|
||||||
|
chown 1000:985 /srv/nfs/share
|
||||||
|
chmod u+rwx /srv/nfs/share
|
||||||
|
```
|
||||||
|
|
||||||
|
Start the Docker-OSX container with the additional flag `--network host`
|
||||||
|
|
||||||
|
Create and mount the nfs folder from the mac terminal:
|
||||||
|
```
|
||||||
|
mkdir -p ~/mnt
|
||||||
|
sudo mount -t nfs 10.0.2.2:/srv/nfs/share ~/mnt
|
||||||
|
```
|
||||||
|
|
||||||
### Share USB Drive into macOS over QEMU
|
### Share USB Drive into macOS over QEMU
|
||||||
|
|
||||||
@ -873,7 +992,7 @@ docker build -t docker-osx:latest \
|
|||||||
--build-arg RANKMIRRORS=true \
|
--build-arg RANKMIRRORS=true \
|
||||||
--build-arg MIRROR_COUNTRY=US \
|
--build-arg MIRROR_COUNTRY=US \
|
||||||
--build-arg MIRROR_COUNT=10 \
|
--build-arg MIRROR_COUNT=10 \
|
||||||
--build-arg VERSION=10.15.6 \
|
--build-arg SHORTNAME=catalina \
|
||||||
--build-arg SIZE=200G .
|
--build-arg SIZE=200G .
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -1085,16 +1204,6 @@ Or tell the container to use specific ones using `-e GENERATE_SPECIFIC=true`
|
|||||||
-e MAC_ADDRESS="A8:5C:2C:9A:46:2F" \
|
-e MAC_ADDRESS="A8:5C:2C:9A:46:2F" \
|
||||||
```
|
```
|
||||||
|
|
||||||
### I'd like to run Docker-OSX with WSL2 (Windows, Ubuntu)
|
|
||||||
|
|
||||||
Ensure KVM is enabled and `x11-apps` is installed.
|
|
||||||
|
|
||||||
to void troubles related to docker daemons on WLS 2, use Docker on Windows, and extern it to your distro.
|
|
||||||
See Docker Docs for the complete detail setup [here](https://docs.docker.com/docker-for-windows/wsl/)
|
|
||||||
|
|
||||||
See more in-depth discussion [here](https://github.com/sickcodes/Docker-OSX/issues/17) and [here](https://github.com/sickcodes/Docker-OSX/issues/60).
|
|
||||||
|
|
||||||
|
|
||||||
### Changing display resolution
|
### Changing display resolution
|
||||||
|
|
||||||
The display resolution is controlled by this line:
|
The display resolution is controlled by this line:
|
||||||
@ -1401,9 +1510,6 @@ docker run -it \
|
|||||||
# Boots in a minute or two!
|
# Boots in a minute or two!
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
```bash
|
|
||||||
|
|
||||||
OR if you have an image already and just want to log in and execute arbitrary commands:
|
OR if you have an image already and just want to log in and execute arbitrary commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
BIN
Youtube-Screenshot-Docker-OSX-Setup.png
Normal file
BIN
Youtube-Screenshot-Docker-OSX-Setup.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 104 KiB |
File diff suppressed because it is too large
Load Diff
@ -30,10 +30,11 @@ Optional options:
|
|||||||
--master-plist <filename> Same as above.
|
--master-plist <filename> Same as above.
|
||||||
--output-bootdisk <filename> Optionally change the bootdisk filename
|
--output-bootdisk <filename> Optionally change the bootdisk filename
|
||||||
--output-plist <filename> Optionally change the output plist filename
|
--output-plist <filename> Optionally change the output plist filename
|
||||||
|
--thinkpad Sets ForceOcWriteFlash to true
|
||||||
--help, -h, help Display this help and exit
|
--help, -h, help Display this help and exit
|
||||||
|
|
||||||
Placeholders: {{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}}, {{UUID}},
|
Placeholders: {{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}}, {{UUID}},
|
||||||
{{ROM}}, {{WIDTH}}, {{HEIGHT}}
|
{{ROM}}, {{WIDTH}}, {{HEIGHT}}, {{THINKPAD}}
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
./generate-specific-bootdisk.sh \\
|
./generate-specific-bootdisk.sh \\
|
||||||
@ -183,6 +184,12 @@ while (( "$#" )); do
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
--thinkpad )
|
||||||
|
export THINKPAD=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Invalid option ${1}. Running with default values..."
|
echo "Invalid option ${1}. Running with default values..."
|
||||||
shift
|
shift
|
||||||
@ -193,12 +200,12 @@ done
|
|||||||
|
|
||||||
download_qcow_efi_folder () {
|
download_qcow_efi_folder () {
|
||||||
|
|
||||||
export EFI_FOLDER=./OpenCore-Catalina/EFI
|
export EFI_FOLDER=./OpenCore/EFI
|
||||||
export RESOURCES_FOLDER=./resources/OcBinaryData/Resources
|
export RESOURCES_FOLDER=./resources/OcBinaryData/Resources
|
||||||
|
|
||||||
# check if we are inside OSX-KVM already
|
# check if we are inside OSX-KVM already
|
||||||
# if not, download OSX-KVM locally
|
# if not, download OSX-KVM locally
|
||||||
[ -d ./OpenCore-Catalina/EFI/ ] || {
|
[ -d ./OpenCore/EFI/ ] || {
|
||||||
[ -d ./OSX-KVM/ ] || git clone --recurse-submodules --depth 1 https://github.com/kholia/OSX-KVM.git
|
[ -d ./OSX-KVM/ ] || git clone --recurse-submodules --depth 1 https://github.com/kholia/OSX-KVM.git
|
||||||
export EFI_FOLDER="./OSX-KVM/${EFI_FOLDER}"
|
export EFI_FOLDER="./OSX-KVM/${EFI_FOLDER}"
|
||||||
}
|
}
|
||||||
@ -233,6 +240,13 @@ generate_bootdisk () {
|
|||||||
wget -O "${MASTER_PLIST:=./config-nopicker-custom.plist}" "${MASTER_PLIST_URL}"
|
wget -O "${MASTER_PLIST:=./config-nopicker-custom.plist}" "${MASTER_PLIST_URL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${THINKPAD}" == true ]]; then
|
||||||
|
echo "Thinkpads: setting ForceOcWriteFlash to true"
|
||||||
|
export THINKPAD=true
|
||||||
|
else
|
||||||
|
export THINKPAD=false
|
||||||
|
fi
|
||||||
|
|
||||||
[ -e ./opencore-image-ng.sh ] \
|
[ -e ./opencore-image-ng.sh ] \
|
||||||
|| { wget "${OPENCORE_IMAGE_MAKER_URL}" \
|
|| { wget "${OPENCORE_IMAGE_MAKER_URL}" \
|
||||||
&& chmod +x opencore-image-ng.sh ; }
|
&& chmod +x opencore-image-ng.sh ; }
|
||||||
@ -252,6 +266,7 @@ generate_bootdisk () {
|
|||||||
-e s/\{\{ROM\}\}/"${ROM}"/g \
|
-e s/\{\{ROM\}\}/"${ROM}"/g \
|
||||||
-e s/\{\{WIDTH\}\}/"${WIDTH:-1920}"/g \
|
-e s/\{\{WIDTH\}\}/"${WIDTH:-1920}"/g \
|
||||||
-e s/\{\{HEIGHT\}\}/"${HEIGHT:-1080}"/g \
|
-e s/\{\{HEIGHT\}\}/"${HEIGHT:-1080}"/g \
|
||||||
|
-e s/\{\{THINKPAD\}\}/"${THINKPAD:-false}"/g \
|
||||||
"${MASTER_PLIST}" > ./tmp.config.plist || exit 1
|
"${MASTER_PLIST}" > ./tmp.config.plist || exit 1
|
||||||
else
|
else
|
||||||
cat <<EOF && exit 1
|
cat <<EOF && exit 1
|
||||||
|
@ -30,6 +30,7 @@ General options:
|
|||||||
--create-envs, --envs Create all corresponding sourcable envs
|
--create-envs, --envs Create all corresponding sourcable envs
|
||||||
--create-plists, --plists Create all corresponding config.plists
|
--create-plists, --plists Create all corresponding config.plists
|
||||||
--create-bootdisks, --bootdisks Create all corresponding bootdisks [SLOW]
|
--create-bootdisks, --bootdisks Create all corresponding bootdisks [SLOW]
|
||||||
|
--thinkpad Toggles ForceOcWriteFlash to true
|
||||||
--help, -h, help Display this help and exit
|
--help, -h, help Display this help and exit
|
||||||
|
|
||||||
Additional options only if you are creating ONE serial set:
|
Additional options only if you are creating ONE serial set:
|
||||||
@ -38,7 +39,7 @@ Additional options only if you are creating ONE serial set:
|
|||||||
|
|
||||||
Custom plist placeholders:
|
Custom plist placeholders:
|
||||||
{{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}},
|
{{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}},
|
||||||
{{UUID}}, {{ROM}}, {{WIDTH}}, {{HEIGHT}}
|
{{UUID}}, {{ROM}}, {{WIDTH}}, {{HEIGHT}}, {{THINKPAD}}
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
./generate-unique-machine-values.sh --count 1 --plists --bootdisks --envs
|
./generate-unique-machine-values.sh --count 1 --plists --bootdisks --envs
|
||||||
@ -203,8 +204,13 @@ while (( "$#" )); do
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--thinkpad )
|
||||||
|
export THINKPAD=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Invalid option. Running with default values..."
|
echo "Invalid option ${1}. Running with default values..."
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -226,12 +232,12 @@ download_vendor_mac_addresses () {
|
|||||||
|
|
||||||
download_qcow_efi_folder () {
|
download_qcow_efi_folder () {
|
||||||
|
|
||||||
export EFI_FOLDER=./OpenCore-Catalina/EFI
|
export EFI_FOLDER=./OpenCore/EFI
|
||||||
export RESOURCES_FOLDER=./resources/OcBinaryData/Resources
|
export RESOURCES_FOLDER=./resources/OcBinaryData/Resources
|
||||||
|
|
||||||
# check if we are inside OSX-KVM already
|
# check if we are inside OSX-KVM already
|
||||||
# if not, download OSX-KVM locally
|
# if not, download OSX-KVM locally
|
||||||
[ -d ./OpenCore-Catalina/EFI/ ] || {
|
[ -d ./OpenCore/EFI/ ] || {
|
||||||
[ -d ./OSX-KVM/ ] || git clone --recurse-submodules --depth 1 https://github.com/kholia/OSX-KVM.git
|
[ -d ./OSX-KVM/ ] || git clone --recurse-submodules --depth 1 https://github.com/kholia/OSX-KVM.git
|
||||||
export EFI_FOLDER="./OSX-KVM/${EFI_FOLDER}"
|
export EFI_FOLDER="./OSX-KVM/${EFI_FOLDER}"
|
||||||
}
|
}
|
||||||
@ -313,6 +319,7 @@ export UUID="${UUID}"
|
|||||||
export MAC_ADDRESS="${MAC_ADDRESS}"
|
export MAC_ADDRESS="${MAC_ADDRESS}"
|
||||||
export WIDTH="${WIDTH}"
|
export WIDTH="${WIDTH}"
|
||||||
export HEIGHT="${HEIGHT}"
|
export HEIGHT="${HEIGHT}"
|
||||||
|
export THINKPAD="${THINKPAD}"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@ -333,10 +340,17 @@ EOF
|
|||||||
wget -O "${MASTER_PLIST:=./config-nopicker-custom.plist}" "${MASTER_PLIST_URL}"
|
wget -O "${MASTER_PLIST:=./config-nopicker-custom.plist}" "${MASTER_PLIST_URL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${THINKPAD}" == true ]]; then
|
||||||
|
echo "Thinkpads: setting ForceOcWriteFlash to true"
|
||||||
|
export THINKPAD=true
|
||||||
|
else
|
||||||
|
export THINKPAD=false
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p "${OUTPUT_DIRECTORY}/plists"
|
mkdir -p "${OUTPUT_DIRECTORY}/plists"
|
||||||
source "${OUTPUT_ENV_FILE}"
|
source "${OUTPUT_ENV_FILE}"
|
||||||
ROM_VALUE="${MAC_ADDRESS//\:/}"
|
ROM="${MAC_ADDRESS//\:/}"
|
||||||
ROM_VALUE="${ROM_VALUE,,}"
|
ROM="${ROM,,}"
|
||||||
sed -e s/\{\{DEVICE_MODEL\}\}/"${DEVICE_MODEL}"/g \
|
sed -e s/\{\{DEVICE_MODEL\}\}/"${DEVICE_MODEL}"/g \
|
||||||
-e s/\{\{SERIAL\}\}/"${SERIAL}"/g \
|
-e s/\{\{SERIAL\}\}/"${SERIAL}"/g \
|
||||||
-e s/\{\{BOARD_SERIAL\}\}/"${BOARD_SERIAL}"/g \
|
-e s/\{\{BOARD_SERIAL\}\}/"${BOARD_SERIAL}"/g \
|
||||||
@ -344,6 +358,7 @@ EOF
|
|||||||
-e s/\{\{ROM\}\}/"${ROM}"/g \
|
-e s/\{\{ROM\}\}/"${ROM}"/g \
|
||||||
-e s/\{\{WIDTH\}\}/"${WIDTH}"/g \
|
-e s/\{\{WIDTH\}\}/"${WIDTH}"/g \
|
||||||
-e s/\{\{HEIGHT\}\}/"${HEIGHT}"/g \
|
-e s/\{\{HEIGHT\}\}/"${HEIGHT}"/g \
|
||||||
|
-e s/\{\{THINKPAD\}\}/"${THINKPAD}"/g \
|
||||||
"${MASTER_PLIST}" > "${OUTPUT_DIRECTORY}/plists/${SERIAL}.config.plist" || exit 1
|
"${MASTER_PLIST}" > "${OUTPUT_DIRECTORY}/plists/${SERIAL}.config.plist" || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ fish part-add /dev/sda p 302048 -2048
|
|||||||
fish part-set-gpt-type /dev/sda 1 C12A7328-F81F-11D2-BA4B-00A0C93EC93B
|
fish part-set-gpt-type /dev/sda 1 C12A7328-F81F-11D2-BA4B-00A0C93EC93B
|
||||||
fish part-set-bootable /dev/sda 1 true
|
fish part-set-bootable /dev/sda 1 true
|
||||||
fish mkfs vfat /dev/sda1 label:EFI
|
fish mkfs vfat /dev/sda1 label:EFI
|
||||||
fish mkfs vfat /dev/sda2 label:OpenCoreBoo
|
fish mkfs vfat /dev/sda2 label:OpenCore
|
||||||
fish mount /dev/sda2 /
|
fish mount /dev/sda2 /
|
||||||
fish mkdir /ESP
|
fish mkdir /ESP
|
||||||
fish mount /dev/sda1 /ESP
|
fish mount /dev/sda1 /ESP
|
||||||
@ -151,7 +151,7 @@ fish copy-in $WORK/EFI/OC/OpenCore.efi /ESP/EFI/OC
|
|||||||
fish copy-in $WORK/EFI/OC/Drivers /ESP/EFI/OC/
|
fish copy-in $WORK/EFI/OC/Drivers /ESP/EFI/OC/
|
||||||
fish copy-in $WORK/EFI/OC/Kexts /ESP/EFI/OC/
|
fish copy-in $WORK/EFI/OC/Kexts /ESP/EFI/OC/
|
||||||
fish copy-in $WORK/EFI/OC/ACPI /ESP/EFI/OC/
|
fish copy-in $WORK/EFI/OC/ACPI /ESP/EFI/OC/
|
||||||
fish copy-in $WORK/EFI/OC/Resources /ESP/EFI/OC/
|
fish copy-in $BASE/resources/OcBinaryData/Resources /ESP/EFI/OC/
|
||||||
fish copy-in $WORK/EFI/OC/Tools /ESP/EFI/OC/
|
fish copy-in $WORK/EFI/OC/Tools /ESP/EFI/OC/
|
||||||
|
|
||||||
# Note
|
# Note
|
||||||
|
Submodule osx-serial-generator updated: 769babcc58...e9b2bf825c
BIN
tests/big-sur_master.png
Normal file
BIN
tests/big-sur_master.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 196 KiB |
67
tests/boot-images.sh
Normal file
67
tests/boot-images.sh
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Author: Sick.Codes https://twitter.com/sickcodes
|
||||||
|
# Contact: https://github.com/sickcodes, https://sick.codes
|
||||||
|
# Copyright: sickcodes (C) 2021
|
||||||
|
# License: GPLv3+
|
||||||
|
# Title: Docker-OSX (Mac on Docker)
|
||||||
|
# Repository: https://github.com/sickcodes/Docker-OSX
|
||||||
|
# Website: https://sick.codes
|
||||||
|
#
|
||||||
|
# Status: Used internally to run each image and take screenshots until they match the pngs in this folder.
|
||||||
|
#
|
||||||
|
|
||||||
|
# note to self: # to get master images, boot each image, then screen shot using DISPLAY=:99 in the test.sh script
|
||||||
|
# scrot -o high-sierra_master.png
|
||||||
|
# scrot -o mojave_master.png
|
||||||
|
# scrot -o catalina_master.png
|
||||||
|
# scrot -o big-sur_master.png
|
||||||
|
# scrot -o monterey_master.png
|
||||||
|
# pull off remote server to the tests folder
|
||||||
|
# REMOTE_SERVER=
|
||||||
|
# scp root@"${REMOTE_SERVER}":~/*_master.png .
|
||||||
|
|
||||||
|
export DISPLAY=:99
|
||||||
|
|
||||||
|
TESTS=(
|
||||||
|
high-sierra
|
||||||
|
mojave
|
||||||
|
catalina
|
||||||
|
big-sur
|
||||||
|
monterey
|
||||||
|
)
|
||||||
|
|
||||||
|
# test each docker image to see if they boot to their unique respective installation screens.
|
||||||
|
|
||||||
|
for TEST in "${TESTS[@]}"; do
|
||||||
|
# run the image detached
|
||||||
|
docker run --rm -d \
|
||||||
|
--device /dev/kvm \
|
||||||
|
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||||
|
-e "DISPLAY=:99" \
|
||||||
|
"sickcodes/docker-osx:${TEST}"
|
||||||
|
|
||||||
|
# imcat the expected test screenshot to ./"${TEST}_master.txt"
|
||||||
|
imcat ~/Docker-OSX/tests/${TEST}_master.png > ./"${TEST}_master.txt"
|
||||||
|
|
||||||
|
# run until the screen matches the expected screen
|
||||||
|
while :; do
|
||||||
|
sleep 5
|
||||||
|
# screenshot the Xvfb
|
||||||
|
scrotcat > ./"${TEST}.txt"
|
||||||
|
# diff the low res txt files created from imcat
|
||||||
|
diff "./${TEST}.txt" ./"${TEST}_master.txt" && break
|
||||||
|
scrotcat
|
||||||
|
done
|
||||||
|
|
||||||
|
# kill any containers
|
||||||
|
docker kill "$(docker ps --format "{{.ID}}")"
|
||||||
|
|
||||||
|
# ensure all containers are dead
|
||||||
|
until [[ "$(docker ps | wc -l)" = 1 ]]; do
|
||||||
|
sleep 1
|
||||||
|
docker ps | xargs docker kill
|
||||||
|
done
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
BIN
tests/catalina_master.png
Normal file
BIN
tests/catalina_master.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 316 KiB |
BIN
tests/high-sierra_master.png
Normal file
BIN
tests/high-sierra_master.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 328 KiB |
BIN
tests/mojave_master.png
Normal file
BIN
tests/mojave_master.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 316 KiB |
BIN
tests/monterey_master.png
Normal file
BIN
tests/monterey_master.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 194 KiB |
145
tests/test.sh
145
tests/test.sh
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/docker
|
#!/usr/bin/bash
|
||||||
# ____ __ ____ ______ __
|
# ____ __ ____ ______ __
|
||||||
# / __ \____ _____/ /_____ _____/ __ \/ ___/ |/ /
|
# / __ \____ _____/ /_____ _____/ __ \/ ___/ |/ /
|
||||||
# / / / / __ \/ ___/ //_/ _ \/ ___/ / / /\__ \| /
|
# / / / / __ \/ ___/ //_/ _ \/ ___/ / / /\__ \| /
|
||||||
@ -12,7 +12,7 @@
|
|||||||
# Repository: https://github.com/sickcodes/Docker-OSX
|
# Repository: https://github.com/sickcodes/Docker-OSX
|
||||||
# Website: https://sick.codes
|
# Website: https://sick.codes
|
||||||
#
|
#
|
||||||
# Status: Work in progress.
|
# Status: Used internally to auto build, run and test images on DO.
|
||||||
#
|
#
|
||||||
|
|
||||||
help_text="Usage: ./test.sh --branch <string> --repo <string>
|
help_text="Usage: ./test.sh --branch <string> --repo <string>
|
||||||
@ -120,13 +120,17 @@ NO_CACHE="${NO_CACHE:=--no-cache}"
|
|||||||
|
|
||||||
|
|
||||||
TEST_BUILDS=(
|
TEST_BUILDS=(
|
||||||
'docker-osx:latest'
|
|
||||||
'docker-osx:naked'
|
'docker-osx:naked'
|
||||||
'docker-osx:naked-auto'
|
'docker-osx:naked-auto'
|
||||||
'docker-osx:big-sur'
|
|
||||||
'docker-osx:monterey'
|
|
||||||
'docker-osx:auto'
|
'docker-osx:auto'
|
||||||
#'docker-osx:auto-big-sur'
|
)
|
||||||
|
|
||||||
|
VERSION_BUILDS=(
|
||||||
|
'high-sierra'
|
||||||
|
'mojave'
|
||||||
|
'catalina'
|
||||||
|
'big-sur'
|
||||||
|
'monterey'
|
||||||
)
|
)
|
||||||
|
|
||||||
install_docker () {
|
install_docker () {
|
||||||
@ -174,7 +178,7 @@ install_scrotcat () {
|
|||||||
make -C ./imcat
|
make -C ./imcat
|
||||||
sudo cp ./imcat/imcat /usr/bin/imcat
|
sudo cp ./imcat/imcat /usr/bin/imcat
|
||||||
touch /usr/bin/scrotcat
|
touch /usr/bin/scrotcat
|
||||||
tee -a /usr/bin/scrotcat <<< '/usr/bin/imcat <(scrot -o /dev/stdout)'
|
tee /usr/bin/scrotcat <<< '/usr/bin/imcat <(scrot -o /dev/stdout)'
|
||||||
chmod +x /usr/bin/scrotcat
|
chmod +x /usr/bin/scrotcat
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,25 +200,13 @@ enable_kvm () {
|
|||||||
echo 1 | tee /sys/module/kvm/parameters/ignore_msrs
|
echo 1 | tee /sys/module/kvm/parameters/ignore_msrs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
clone_repo () {
|
clone_repo () {
|
||||||
git clone --branch="${1}" "${2}" Docker-OSX
|
git clone --branch="${1}" "${2}" Docker-OSX
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
docker-osx:latest () {
|
|
||||||
docker build ${NO_CACHE} \
|
|
||||||
--build-arg BRANCH="${BRANCH}" \
|
|
||||||
--build-arg RANKMIRRORS=true \
|
|
||||||
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
|
||||||
-f ./Dockerfile \
|
|
||||||
-t docker-osx:latest .
|
|
||||||
docker tag docker-osx:latest sickcodes/docker-osx:latest
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
docker-osx:naked () {
|
docker-osx:naked () {
|
||||||
docker build ${NO_CACHE} \
|
docker build ${NO_CACHE} \
|
||||||
|
--squash \
|
||||||
--build-arg RANKMIRRORS=true \
|
--build-arg RANKMIRRORS=true \
|
||||||
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
||||||
-f ./Dockerfile.naked \
|
-f ./Dockerfile.naked \
|
||||||
@ -222,9 +214,9 @@ docker-osx:naked () {
|
|||||||
docker tag docker-osx:naked sickcodes/docker-osx:naked
|
docker tag docker-osx:naked sickcodes/docker-osx:naked
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
docker-osx:naked-auto () {
|
docker-osx:naked-auto () {
|
||||||
docker build ${NO_CACHE} \
|
docker build ${NO_CACHE} \
|
||||||
|
--squash \
|
||||||
--build-arg RANKMIRRORS=true \
|
--build-arg RANKMIRRORS=true \
|
||||||
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
||||||
-f ./Dockerfile.naked-auto \
|
-f ./Dockerfile.naked-auto \
|
||||||
@ -232,26 +224,6 @@ docker-osx:naked-auto () {
|
|||||||
docker tag docker-osx:naked-auto sickcodes/docker-osx:naked-auto
|
docker tag docker-osx:naked-auto sickcodes/docker-osx:naked-auto
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
docker-osx:big-sur () {
|
|
||||||
docker build ${NO_CACHE} \
|
|
||||||
--build-arg VERSION=11 \
|
|
||||||
--build-arg RANKMIRRORS=true \
|
|
||||||
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
|
||||||
-f ./Dockerfile \
|
|
||||||
-t docker-osx:big-sur .
|
|
||||||
docker tag docker-osx:big-sur sickcodes/docker-osx:big-sur
|
|
||||||
}
|
|
||||||
|
|
||||||
docker-osx:monterey () {
|
|
||||||
docker build ${NO_CACHE} \
|
|
||||||
--build-arg RANKMIRRORS=true \
|
|
||||||
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
|
||||||
-f ./Dockerfile.monterey \
|
|
||||||
-t docker-osx:monterey .
|
|
||||||
docker tag docker-osx:monterey sickcodes/docker-osx:monterey
|
|
||||||
}
|
|
||||||
|
|
||||||
docker-osx:auto () {
|
docker-osx:auto () {
|
||||||
docker build ${NO_CACHE} \
|
docker build ${NO_CACHE} \
|
||||||
--build-arg RANKMIRRORS=true \
|
--build-arg RANKMIRRORS=true \
|
||||||
@ -261,17 +233,35 @@ docker-osx:auto () {
|
|||||||
docker tag docker-osx:auto sickcodes/docker-osx:auto
|
docker tag docker-osx:auto sickcodes/docker-osx:auto
|
||||||
}
|
}
|
||||||
|
|
||||||
docker-osx:auto-big-sur () {
|
# docker-osx:auto-big-sur () {
|
||||||
|
# docker build ${NO_CACHE} \
|
||||||
|
# --build-arg RANKMIRRORS=true \
|
||||||
|
# --build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
||||||
|
# --build-arg IMAGE_URL='https://images.sick.codes/mac_hdd_ng_auto_big_sur.img' \
|
||||||
|
# -f ./Dockerfile.auto \
|
||||||
|
# -t docker-osx:auto-big-sur .
|
||||||
|
# docker tag docker-osx:auto-big-sur sickcodes/docker-osx:auto-big-sur
|
||||||
|
# }
|
||||||
|
|
||||||
|
docker-osx:version () {
|
||||||
|
SHORTNAME="${1}"
|
||||||
docker build ${NO_CACHE} \
|
docker build ${NO_CACHE} \
|
||||||
|
--build-arg BRANCH="${BRANCH}" \
|
||||||
--build-arg RANKMIRRORS=true \
|
--build-arg RANKMIRRORS=true \
|
||||||
|
--build-arg SHORTNAME="${SHORTNAME}" \
|
||||||
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
||||||
--build-arg IMAGE_URL='https://images.sick.codes/mac_hdd_ng_auto_big_sur.img' \
|
-f ./Dockerfile \
|
||||||
-f ./Dockerfile.auto \
|
-t "docker-osx:${SHORTNAME}" .
|
||||||
-t docker-osx:auto-big-sur .
|
docker tag "docker-osx:${SHORTNAME}" "sickcodes/docker-osx:${SHORTNAME}"
|
||||||
docker tag docker-osx:auto-big-sur sickcodes/docker-osx:auto-big-sur
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reset_docker_hard () {
|
reset_docker_hard () {
|
||||||
|
|
||||||
|
tee /etc/docker/daemon.json <<'EOF'
|
||||||
|
{
|
||||||
|
"experimental": true
|
||||||
|
}
|
||||||
|
EOF
|
||||||
systemctl disable --now docker
|
systemctl disable --now docker
|
||||||
systemctl disable --now docker.socket
|
systemctl disable --now docker.socket
|
||||||
systemctl stop docker
|
systemctl stop docker
|
||||||
@ -280,42 +270,47 @@ reset_docker_hard () {
|
|||||||
systemctl enable --now docker
|
systemctl enable --now docker
|
||||||
}
|
}
|
||||||
|
|
||||||
tee -a ~/.bashrc <<EOF ; true &&
|
tee -a ~/.bashrc <<EOF
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
export TZ=UTC
|
export TZ=UTC
|
||||||
EOF
|
EOF
|
||||||
export DEBIAN_FRONTEND=noninteractive \
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
; export TZ=UTC \
|
export TZ=UTC
|
||||||
; ln -snf "/usr/share/zoneinfo/${TZ}" /etc/localtime \
|
ln -snf "/usr/share/zoneinfo/${TZ}" /etc/localtime
|
||||||
; tee -a /etc/timezone <<< "${TZ}" \
|
tee -a /etc/timezone <<< "${TZ}"
|
||||||
; apt update -y \
|
apt update -y
|
||||||
; apt-get install keyboard-configuration -y \
|
apt-get install keyboard-configuration -y
|
||||||
; docker -v | grep '\ 20\.\|\ 19\.' || install_docker \
|
docker -v | grep '\ 20\.\|\ 19\.' || install_docker
|
||||||
; yes | apt install -y --no-install-recommends tzdata -y \
|
yes | apt install -y --no-install-recommends tzdata -y
|
||||||
; install_scrotcat \
|
install_scrotcat
|
||||||
; yes | install_vnc \
|
yes | install_vnc
|
||||||
; export_display_99 \
|
export_display_99
|
||||||
; echo start_xvfb \
|
start_xvfb
|
||||||
; start_vnc \
|
# start_vnc
|
||||||
; enable_kvm \
|
enable_kvm
|
||||||
; echo reset_docker_hard \
|
reset_docker_hard
|
||||||
; echo killall Xvfb \
|
echo killall Xvfb
|
||||||
; clone_repo "${BRANCH}" "${REPO}" \
|
clone_repo "${BRANCH}" "${REPO}"
|
||||||
; cd Docker-OSX \
|
cd ./Docker-OSX
|
||||||
; for TEST_BUILD in "${TEST_BUILDS[@]}"; do
|
|
||||||
|
for SHORTNAME in "${VERSION_BUILDS[@]}"; do
|
||||||
|
docker-osx:version "${SHORTNAME}"
|
||||||
|
done
|
||||||
|
|
||||||
|
docker tag docker-osx:catalina sickcodes/docker-osx:latest
|
||||||
|
|
||||||
|
for TEST_BUILD in "${TEST_BUILDS[@]}"; do
|
||||||
"${TEST_BUILD}"
|
"${TEST_BUILD}"
|
||||||
done \
|
done
|
||||||
&& touch COMPLETED
|
|
||||||
|
# boot each image and test
|
||||||
|
bash ./tests/boot-images.sh || exit 1
|
||||||
|
|
||||||
if [[ "${DOCKER_USERNAME}" ]] && [[ "${DOCKER_PASSWORD}" ]]; then
|
if [[ "${DOCKER_USERNAME}" ]] && [[ "${DOCKER_PASSWORD}" ]]; then
|
||||||
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}" \
|
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}" \
|
||||||
&& docker push sickcodes/docker-osx:latest \
|
&& for SHORTNAME in "${VERSION_BUILDS[@]}"; do
|
||||||
&& docker push sickcodes/docker-osx:big-sur \
|
docker push "sickcodes/docker-osx:${SHORTNAME}"
|
||||||
&& docker push sickcodes/docker-osx:monterey \
|
done \
|
||||||
&& docker push sickcodes/docker-osx:naked \
|
|
||||||
&& docker push sickcodes/docker-osx:naked-auto \
|
|
||||||
&& docker push sickcodes/docker-osx:auto \
|
|
||||||
&& docker push sickcodes/docker-osx:auto-big-sur \
|
|
||||||
&& touch PUSHED
|
&& touch PUSHED
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user