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
56 Commits
persistent
...
sonoma
Author | SHA1 | Date | |
---|---|---|---|
37aad0460d | |||
54c96557c0 | |||
e17ee6c90a | |||
a208578bf0 | |||
d09fa38b47 | |||
b09155a612 | |||
669bea269d | |||
846cf8fdaf | |||
bc0be6b6c7 | |||
bb1e992916 | |||
51f1c1ce14 | |||
ac3fe529a8 | |||
0daf0ff5d4 | |||
8f555f085d | |||
924fa68088 | |||
237a286e44 | |||
de142e8e49 | |||
fc8f78ff0f | |||
6dc83cebc2 | |||
9b10a306db | |||
fbe5dba618 | |||
2265bb5a3f | |||
86452e6da3 | |||
e612ca3229 | |||
dab7fc884c | |||
c0ea46aab5 | |||
bb75dc4669 | |||
9aac2dbe7f | |||
cedfbf521c | |||
671c46046a | |||
e5ca81ee6e | |||
ed5e50da7c | |||
306961a107 | |||
917e091798 | |||
1e00c9cfd7 | |||
f794cac0e2 | |||
e0d753030b | |||
586e093ba6 | |||
160489b0e3 | |||
a43fc57188 | |||
ab54b75ab8 | |||
49b86bec9a | |||
40a7e0d200 | |||
e6763761c0 | |||
1fa728b08d | |||
d7f0c289fc | |||
1103007c8d | |||
41b07267b2 | |||
fa0e336c7d | |||
55293cbb6c | |||
f9bfddbb5b | |||
4501c6a854 | |||
524749cbb8 | |||
73d84d28dd | |||
2d6d4b670a | |||
43a4c0b0d9 |
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,6 +1,3 @@
|
|||||||
[submodule "osx-serial-generator"]
|
[submodule "osx-serial-generator"]
|
||||||
path = osx-serial-generator
|
path = osx-serial-generator
|
||||||
url = https://github.com/sickcodes/osx-serial-generator.git
|
url = https://github.com/sickcodes/osx-serial-generator.git
|
||||||
[submodule "OSX-KVM"]
|
|
||||||
path = OSX-KVM
|
|
||||||
url = https://github.com/kholia/OSX-KVM
|
|
||||||
|
10
CREDITS.md
10
CREDITS.md
@ -120,4 +120,12 @@ This project now uses the fantastic OpenCore bootloader from the community OpenC
|
|||||||
|
|
||||||
[@aslafy-z](https://github.com/aslafy-z) chore(docs): update helm requirements list style #420
|
[@aslafy-z](https://github.com/aslafy-z) chore(docs): update helm requirements list style #420
|
||||||
|
|
||||||
@Mhartig - Worked out issue `Enter a number (default=1): error: invalid number: y`
|
[@kimjammer](https://github.com/kimjammer) Update Windows Installation section #422
|
||||||
|
|
||||||
|
[@Mhartig](https://github.com/Mhartig) - Worked out issue `Enter a number (default=1): error: invalid number: y`
|
||||||
|
|
||||||
|
[@felipestt](https://github.com/felipestt) Use more CPU Cores/SMP' broken #440
|
||||||
|
|
||||||
|
[@routmoute](https://github.com/routmoute) README: add PulseAudio with WSLg #442
|
||||||
|
|
||||||
|
[@dulatello08](https://github.com/dulatello08) Update README.md #452
|
||||||
|
121
Dockerfile
121
Dockerfile
@ -24,6 +24,7 @@
|
|||||||
#
|
#
|
||||||
# docker build -t docker-osx .
|
# docker build -t docker-osx .
|
||||||
# docker build -t docker-osx --build-arg VERSION=10.15.5 --build-arg SIZE=200G .
|
# docker build -t docker-osx --build-arg VERSION=10.15.5 --build-arg SIZE=200G .
|
||||||
|
# docker build -t docker-osx-sonoma --build-arg BRANCH=sonoma --build-arg SHORTNAME=sonoma .
|
||||||
#
|
#
|
||||||
# Basic Run:
|
# Basic Run:
|
||||||
#
|
#
|
||||||
@ -58,28 +59,42 @@ 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 PARALLEL_DOWNLOADS=30
|
||||||
|
|
||||||
# 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\ =\ ${PARALLEL_DOWNLOADS:=30}/g /etc/pacman.conf
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
RUN tee /etc/pacman.d/mirrorlist <<< 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' \
|
||||||
|
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
||||||
|
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch'
|
||||||
|
|
||||||
|
# Fixes issue with invalid GPG keys: update the archlinux-keyring package to get the latest keys, then remove and regenerate gnupg keys
|
||||||
|
RUN pacman -Sy archlinux-keyring --noconfirm \
|
||||||
|
&& rm -rf /etc/pacman.d/gnupg \
|
||||||
|
&& pacman-key --init \
|
||||||
|
&& pacman-key --populate archlinux
|
||||||
|
|
||||||
RUN if [[ "${RANKMIRRORS}" ]]; then \
|
RUN if [[ "${RANKMIRRORS}" ]]; then \
|
||||||
{ pacman -Sy wget --noconfirm || pacman -Syu wget --noconfirm ; } \
|
{ pacman -Sy wget --noconfirm || pacman -Syu wget --noconfirm ; } \
|
||||||
; wget -O ./rankmirrors "https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/rankmirrors" \
|
; wget -O ./rankmirrors "https://raw.githubusercontent.com/sickcodes/Docker-OSX/${BRANCH:=master}/rankmirrors" \
|
||||||
; wget -O- "https://www.archlinux.org/mirrorlist/?country=${MIRROR_COUNTRY:-US}&protocol=https&use_mirror_status=on" \
|
; wget -O- "https://www.archlinux.org/mirrorlist/?country=${MIRROR_COUNTRY:-US}&protocol=https&use_mirror_status=on" \
|
||||||
| sed -e 's/^#Server/Server/' -e '/^#/d' \
|
| sed -e 's/^#Server/Server/' -e '/^#/d' \
|
||||||
| head -n "$((${MIRROR_COUNT:-10}+1))" \
|
| head -n "$((${MIRROR_COUNT:-10}+1))" \
|
||||||
| bash ./rankmirrors --verbose --max-time 5 - > /etc/pacman.d/mirrorlist \
|
| bash ./rankmirrors --verbose --max-time 5 - > /etc/pacman.d/mirrorlist \
|
||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirrors.evowise.com/archlinux/$repo/os/$arch' \
|
|
||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
|
||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
|
||||||
&& cat /etc/pacman.d/mirrorlist \
|
&& cat /etc/pacman.d/mirrorlist \
|
||||||
; fi
|
; fi
|
||||||
|
|
||||||
|
RUN tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkp://keyserver.ubuntu.com' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://hkps.pool.sks-keyservers.net:443' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkp://pgp.mit.edu:11371' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://keys.openpgp.org' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://keys.mailvelope.com'
|
||||||
|
|
||||||
# This fails on hub.docker.com, useful for debugging in cloud
|
# This fails on hub.docker.com, useful for debugging in cloud
|
||||||
# RUN [[ $(egrep -c '(svm|vmx)' /proc/cpuinfo) -gt 0 ]] || { echo KVM not possible on this host && exit 1; }
|
# RUN [[ $(egrep -c '(svm|vmx)' /proc/cpuinfo) -gt 0 ]] || { echo KVM not possible on this host && exit 1; }
|
||||||
|
|
||||||
@ -90,11 +105,11 @@ RUN pacman -Syu git zip vim nano alsa-utils openssh --noconfirm \
|
|||||||
&& ln -s /bin/vim /bin/vi \
|
&& ln -s /bin/vim /bin/vi \
|
||||||
&& useradd arch -p arch \
|
&& useradd arch -p arch \
|
||||||
&& tee -a /etc/sudoers <<< 'arch ALL=(ALL) NOPASSWD: ALL' \
|
&& tee -a /etc/sudoers <<< 'arch ALL=(ALL) NOPASSWD: ALL' \
|
||||||
&& mkdir /home/arch \
|
&& mkdir -p /home/arch \
|
||||||
&& chown arch:arch /home/arch
|
&& chown arch:arch /home/arch
|
||||||
|
|
||||||
# allow ssh to container
|
# allow ssh to container
|
||||||
RUN mkdir -m 700 /root/.ssh
|
RUN mkdir -p -m 700 /root/.ssh
|
||||||
|
|
||||||
WORKDIR /root/.ssh
|
WORKDIR /root/.ssh
|
||||||
RUN touch authorized_keys \
|
RUN touch authorized_keys \
|
||||||
@ -113,17 +128,14 @@ RUN tee -a sshd_config <<< 'AllowTcpForwarding yes' \
|
|||||||
|
|
||||||
USER arch
|
USER arch
|
||||||
|
|
||||||
# download OSX-KVM
|
# download OSX-KVM for the submodules
|
||||||
# RUN git clone --recurse-submodules --depth 1 https://github.com/kholia/OSX-KVM.git /home/arch/Docker-OSX/OSX-KVM
|
RUN git clone --recurse-submodules --depth 1 https://github.com/kholia/OSX-KVM.git /home/arch/OSX-KVM
|
||||||
RUN git clone --recurse-submodules --depth 1 https://github.com/sickcodes/Docker-OSX.git /home/arch/Docker-OSX
|
|
||||||
|
|
||||||
# Create a symbolic link from OSX-KVM to submodule directory as we are using as a submodule instead now (redunancy proof)
|
|
||||||
RUN ln -s /home/arch/Docker-OSX/OSX-KVM /home/arch/OSX-KVM
|
|
||||||
|
|
||||||
# enable ssh
|
# enable ssh
|
||||||
# docker exec .... ./enable-ssh.sh
|
# docker exec .... ./enable-ssh.sh
|
||||||
|
USER arch
|
||||||
|
|
||||||
WORKDIR /home/arch/Docker-OSX
|
WORKDIR /home/arch/OSX-KVM
|
||||||
|
|
||||||
RUN touch enable-ssh.sh \
|
RUN touch enable-ssh.sh \
|
||||||
&& chmod +x ./enable-ssh.sh \
|
&& chmod +x ./enable-ssh.sh \
|
||||||
@ -142,31 +154,40 @@ 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 bc qemu libvirt dnsmasq virt-manager bridge-utils openresolv jack2 ebtables edk2-ovmf netctl libvirt-dbus wget --overwrite --noconfirm \
|
RUN yes | sudo pacman -Syu bc qemu-desktop libvirt dnsmasq virt-manager bridge-utils openresolv jack2 ebtables edk2-ovmf netctl libvirt-dbus wget scrot --overwrite --noconfirm \
|
||||||
&& yes | sudo pacman -Scc
|
&& yes | sudo pacman -Scc
|
||||||
|
|
||||||
WORKDIR /home/arch/Docker-OSX/OSX-KVM
|
WORKDIR /home/arch/OSX-KVM
|
||||||
|
|
||||||
# RUN wget https://raw.githubusercontent.com/kholia/OSX-KVM/master/fetch-macOS-v2.py
|
|
||||||
|
|
||||||
|
# shortname default is catalina, which means :latest is catalina
|
||||||
ARG SHORTNAME=catalina
|
ARG SHORTNAME=catalina
|
||||||
|
|
||||||
RUN make \
|
RUN make \
|
||||||
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c BaseSystem.img \
|
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c BaseSystem.img \
|
||||||
&& rm ./BaseSystem.dmg
|
&& rm ./BaseSystem.dmg
|
||||||
|
|
||||||
|
# fix invalid signature on old libguestfs
|
||||||
|
ARG SIGLEVEL=Never
|
||||||
|
|
||||||
|
RUN sudo tee -a /etc/pacman.conf <<< "SigLevel = ${SIGLEVEL}" \
|
||||||
|
&& sudo tee -a /etc/pacman.conf <<< 'RemoteFileSigLevel = Optional' \
|
||||||
|
&& sudo sed -i -e 's/^\#RemoteFileSigLevel/RemoteFileSigLevel/g' /etc/pacman.conf
|
||||||
|
|
||||||
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
|
||||||
|
# reminder this is what makes :naked image larger than expected
|
||||||
RUN if [[ "${LINUX}" == true ]]; then \
|
RUN if [[ "${LINUX}" == true ]]; then \
|
||||||
sudo pacman -Syu linux libguestfs --noconfirm \
|
sudo pacman -Syu linux linux-headers archlinux-keyring guestfs-tools mkinitcpio pcre pcre2 --noconfirm \
|
||||||
|
&& libguestfs-test-tool \
|
||||||
|
&& rm -rf /var/tmp/.guestfs-* \
|
||||||
|
&& yes | sudo pacman -Scc \
|
||||||
; 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'
|
||||||
# RUN git clone --recurse-submodules --depth 1 --branch "${BRANCH}" "${REPO}"
|
RUN git clone --recurse-submodules --depth 1 --branch "${BRANCH:=master}" "${REPO:=https://github.com/sickcodes/Docker-OSX.git}"
|
||||||
RUN git clone --recurse-submodules --depth 1 --branch "${BRANCH}" "${REPO}"
|
|
||||||
|
|
||||||
RUN touch Launch.sh \
|
RUN touch Launch.sh \
|
||||||
&& chmod +x ./Launch.sh \
|
&& chmod +x ./Launch.sh \
|
||||||
@ -181,18 +202,19 @@ RUN touch Launch.sh \
|
|||||||
&& 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}} \' \
|
||||||
&& tee -a Launch.sh <<< '-usb -device usb-kbd -device usb-tablet \' \
|
&& tee -a Launch.sh <<< '-device qemu-xhci,id=xhci \' \
|
||||||
|
&& tee -a Launch.sh <<< '-device usb-kbd,bus=xhci.0 -device usb-tablet,bus=xhci.0 \' \
|
||||||
&& tee -a Launch.sh <<< '-device isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal\(c\)AppleComputerInc \' \
|
&& tee -a Launch.sh <<< '-device isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal\(c\)AppleComputerInc \' \
|
||||||
&& tee -a Launch.sh <<< '-drive if=pflash,format=raw,readonly=on,file=/home/arch/Docker-OSX/OSX-KVM/OVMF_CODE.fd \' \
|
&& tee -a Launch.sh <<< '-drive if=pflash,format=raw,readonly=on,file=/home/arch/OSX-KVM/OVMF_CODE.fd \' \
|
||||||
&& tee -a Launch.sh <<< '-drive if=pflash,format=raw,file=/home/arch/Docker-OSX/OSX-KVM/OVMF_VARS-1024x768.fd \' \
|
&& tee -a Launch.sh <<< '-drive if=pflash,format=raw,file=/home/arch/OSX-KVM/OVMF_VARS-1024x768.fd \' \
|
||||||
&& 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/Docker-OSX/OSX-KVM/OpenCore/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/Docker-OSX/OSX-KVM/BaseSystem.img,format=${BASESYSTEM_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/Docker-OSX/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} \' \
|
||||||
&& tee -a Launch.sh <<< '-device ${NETWORKING:-vmxnet3},netdev=net0,id=net0,mac=${MAC_ADDRESS:-52:54:00:09:49:17} \' \
|
&& tee -a Launch.sh <<< '-device ${NETWORKING:-vmxnet3},netdev=net0,id=net0,mac=${MAC_ADDRESS:-52:54:00:09:49:17} \' \
|
||||||
@ -215,32 +237,6 @@ USER arch
|
|||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
#### 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
|
|
||||||
|
|
||||||
# fix ad hoc errors from using the arch museum to get libguestfs
|
|
||||||
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 -U "${KERNEL_PACKAGE_URL}" --noconfirm || exit 1 \
|
|
||||||
&& sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm || exit 1 \
|
|
||||||
&& 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
|
||||||
@ -259,8 +255,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/Docker-OSX/OSX-KVM/OpenCore/OpenCore.qcow2
|
ARG STOCK_BOOTDISK=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2
|
||||||
ARG STOCK_BOOTDISK_NOPICKER=/home/arch/Docker-OSX/OSX-KVM/OpenCore/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}" \
|
||||||
@ -287,7 +283,7 @@ RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
|
|||||||
; rm -rf /var/tmp/.guestfs-*
|
; rm -rf /var/tmp/.guestfs-*
|
||||||
|
|
||||||
### symlink the old directory as upstream has renamed a directory. Symlinking purely for backwards compatability!
|
### symlink the old directory as upstream has renamed a directory. Symlinking purely for backwards compatability!
|
||||||
RUN ln -s /home/arch/Docker-OSX/OSX-KVM/OpenCore /home/arch/Docker-OSX/OSX-KVM/OpenCore-Catalina || true
|
RUN ln -s /home/arch/OSX-KVM/OpenCore /home/arch/OSX-KVM/OpenCore-Catalina || true
|
||||||
####
|
####
|
||||||
|
|
||||||
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
||||||
@ -320,7 +316,7 @@ ENV GENERATE_UNIQUE=false
|
|||||||
# Boolean for generating a bootdisk with specific serials.
|
# Boolean for generating a bootdisk with specific serials.
|
||||||
ENV GENERATE_SPECIFIC=false
|
ENV GENERATE_SPECIFIC=false
|
||||||
|
|
||||||
ENV IMAGE_PATH=/home/arch/Docker-OSX/OSX-KVM/mac_hdd_ng.img
|
ENV IMAGE_PATH=/home/arch/OSX-KVM/mac_hdd_ng.img
|
||||||
ENV IMAGE_FORMAT=qcow2
|
ENV IMAGE_FORMAT=qcow2
|
||||||
|
|
||||||
ENV KVM='accel=kvm:tcg'
|
ENV KVM='accel=kvm:tcg'
|
||||||
@ -368,12 +364,9 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
; 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/Docker-OSX/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
; [[ "$(fdisk -l /image)" ]] && { \
|
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
&& export IMAGE_PATH=/image \
|
|
||||||
; } \
|
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/Docker-OSX/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}" \
|
||||||
@ -382,7 +375,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/Docker-OSX/OSX-KVM/OpenCore/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 ]] && { \
|
||||||
@ -396,7 +389,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/Docker-OSX/OSX-KVM/OpenCore/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
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
FROM sickcodes/docker-osx:latest
|
FROM sickcodes/docker-osx:latest
|
||||||
|
|
||||||
MAINTAINER 'https://twitter.com/sickcodes' <https://sick.codes>
|
LABEL maintainer='https://twitter.com/sickcodes <https://sick.codes>'
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
@ -53,25 +53,41 @@ ARG SCROT
|
|||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
RUN tee /etc/pacman.d/mirrorlist <<< 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' \
|
||||||
|
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
||||||
|
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch'
|
||||||
|
|
||||||
|
# Fixes issue with invalid GPG keys: update the archlinux-keyring package to get the latest keys, then remove and regenerate gnupg keys
|
||||||
|
RUN pacman -Sy archlinux-keyring --noconfirm \
|
||||||
|
&& rm -rf /etc/pacman.d/gnupg \
|
||||||
|
&& pacman-key --init \
|
||||||
|
&& pacman-key --populate archlinux
|
||||||
|
|
||||||
RUN if [[ "${RANKMIRRORS}" ]]; then \
|
RUN if [[ "${RANKMIRRORS}" ]]; then \
|
||||||
{ pacman -Sy wget --noconfirm || pacman -Syu wget --noconfirm ; } \
|
{ pacman -Sy wget --noconfirm || pacman -Syu wget --noconfirm ; } \
|
||||||
; wget -O ./rankmirrors "https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/rankmirrors" \
|
; wget -O ./rankmirrors "https://raw.githubusercontent.com/sickcodes/Docker-OSX/${BRANCH:=master}/rankmirrors" \
|
||||||
; wget -O- "https://www.archlinux.org/mirrorlist/?country=${MIRROR_COUNTRY:-US}&protocol=https&use_mirror_status=on" \
|
; wget -O- "https://www.archlinux.org/mirrorlist/?country=${MIRROR_COUNTRY:-US}&protocol=https&use_mirror_status=on" \
|
||||||
| sed -e 's/^#Server/Server/' -e '/^#/d' \
|
| sed -e 's/^#Server/Server/' -e '/^#/d' \
|
||||||
| head -n "$((${MIRROR_COUNT:-10}+1))" \
|
| head -n "$((${MIRROR_COUNT:-10}+1))" \
|
||||||
| bash ./rankmirrors --verbose --max-time 5 - > /etc/pacman.d/mirrorlist \
|
| bash ./rankmirrors --verbose --max-time 5 - > /etc/pacman.d/mirrorlist \
|
||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirrors.evowise.com/archlinux/$repo/os/$arch' \
|
|
||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
|
||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
|
||||||
&& cat /etc/pacman.d/mirrorlist \
|
|
||||||
; fi \
|
|
||||||
; yes | pacman -Scc
|
|
||||||
|
|
||||||
RUN pacman -Syu xorg-server-xvfb wget xterm xorg-xhost xorg-xrandr sshpass --noconfirm \
|
|
||||||
|
|
||||||
|
&& cat /etc/pacman.d/mirrorlist \
|
||||||
|
; fi
|
||||||
|
|
||||||
|
RUN tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkp://keyserver.ubuntu.com' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://hkps.pool.sks-keyservers.net:443' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkp://pgp.mit.edu:11371' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://keys.openpgp.org' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://keys.mailvelope.com'
|
||||||
|
|
||||||
|
RUN pacman -Syu xorg-server-xvfb wget xterm xorg-xhost xorg-xrandr --noconfirm \
|
||||||
&& if [[ "${SCROT}" ]]; then \
|
&& if [[ "${SCROT}" ]]; then \
|
||||||
pacman -Syu scrot base-devel --noconfirm \
|
pacman -Syu scrot base-devel --noconfirm \
|
||||||
&& git clone --recurse-submodules --depth 1 https://github.com/stolk/imcat.git \
|
&& git clone --recurse-submodules --depth 1 https://github.com/stolk/imcat.git \
|
||||||
@ -88,39 +104,14 @@ RUN pacman -Syu xorg-server-xvfb wget xterm xorg-xhost xorg-xrandr sshpass --noc
|
|||||||
; fi \
|
; fi \
|
||||||
; yes | pacman -Scc
|
; yes | pacman -Scc
|
||||||
|
|
||||||
|
RUN pacman -S sshpass --noconfirm \
|
||||||
|
&& yes | pacman -Scc
|
||||||
|
|
||||||
USER arch
|
USER arch
|
||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
|
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
|
|
||||||
|
|
||||||
# fix ad hoc errors from using the arch museum to get libguestfs
|
|
||||||
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 -U "${KERNEL_PACKAGE_URL}" --noconfirm || exit 1 \
|
|
||||||
&& sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm || exit 1 \
|
|
||||||
&& rm -rf /var/tmp/.guestfs-* \
|
|
||||||
&& yes | sudo pacman -Scc \
|
|
||||||
&& libguestfs-test-tool || exit 1 \
|
|
||||||
&& rm -rf /var/tmp/.guestfs-*
|
|
||||||
|
|
||||||
####
|
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /home/arch/Docker-OSX/OSX-KVM
|
|
||||||
|
|
||||||
RUN mkdir -p ~/.ssh \
|
RUN mkdir -p ~/.ssh \
|
||||||
&& touch ~/.ssh/authorized_keys \
|
&& touch ~/.ssh/authorized_keys \
|
||||||
@ -145,15 +136,15 @@ ARG IMAGE_URL='https://images.sick.codes/mac_hdd_ng_auto.img'
|
|||||||
|
|
||||||
RUN if [[ "${COMPLETE}" ]]; then \
|
RUN if [[ "${COMPLETE}" ]]; then \
|
||||||
echo "Downloading 20GB image... This step might take a while... Press Ctrl+C if you want to abort." \
|
echo "Downloading 20GB image... This step might take a while... Press Ctrl+C if you want to abort." \
|
||||||
; rm -f /home/arch/Docker-OSX/OSX-KVM/mac_hdd_ng.img \
|
; rm -f /home/arch/OSX-KVM/mac_hdd_ng.img \
|
||||||
&& wget ${WGET_OPTIONS} -O /home/arch/Docker-OSX/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
|
# symlink the old directory, for redundancy
|
||||||
RUN ln -s /home/arch/Docker-OSX/OSX-KVM/OpenCore /home/arch/Docker-OSX/OSX-KVM/OpenCore-Catalina || true
|
RUN ln -s /home/arch/OSX-KVM/OpenCore /home/arch/OSX-KVM/OpenCore-Catalina || true
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
@ -181,7 +172,7 @@ ENV GENERATE_UNIQUE=false
|
|||||||
# Boolean for generating a bootdisk with specific serials.
|
# Boolean for generating a bootdisk with specific serials.
|
||||||
ENV GENERATE_SPECIFIC=false
|
ENV GENERATE_SPECIFIC=false
|
||||||
|
|
||||||
ENV IMAGE_PATH=/home/arch/Docker-OSX/OSX-KVM/mac_hdd_ng.img
|
ENV IMAGE_PATH=/home/arch/OSX-KVM/mac_hdd_ng.img
|
||||||
ENV IMAGE_FORMAT=qcow2
|
ENV IMAGE_FORMAT=qcow2
|
||||||
|
|
||||||
ENV KVM='accel=kvm:tcg'
|
ENV KVM='accel=kvm:tcg'
|
||||||
@ -222,9 +213,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/Docker-OSX/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/Docker-OSX/OSX-KVM/OpenCore/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}" \
|
||||||
@ -233,7 +224,7 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
--bootdisks \
|
--bootdisks \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/Docker-OSX/OSX-KVM/OpenCore/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 ]] && { \
|
||||||
@ -247,7 +238,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/Docker-OSX/OSX-KVM/OpenCore/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 \
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
FROM sickcodes/docker-osx
|
FROM sickcodes/docker-osx
|
||||||
|
|
||||||
MAINTAINER 'https://twitter.com/sickcodes' <https://sick.codes>
|
LABEL maintainer='https://twitter.com/sickcodes <https://sick.codes>'
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
|
@ -32,31 +32,47 @@
|
|||||||
|
|
||||||
FROM sickcodes/docker-osx:latest
|
FROM sickcodes/docker-osx:latest
|
||||||
|
|
||||||
MAINTAINER 'https://twitter.com/sickcodes' <https://sick.codes>
|
LABEL maintainer='https://twitter.com/sickcodes <https://sick.codes>'
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
|
|
||||||
RUN rm -f /home/arch/Docker-OSX/OSX-KVM/mac_hdd_ng.img
|
RUN rm -f /home/arch/OSX-KVM/mac_hdd_ng.img
|
||||||
|
|
||||||
# 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
|
||||||
RUN if [[ "${RANKMIRRORS}" ]]; then { pacman -Sy wget --noconfirm || pacman -Syu wget --noconfirm ; } \
|
|
||||||
; wget -O ./rankmirrors "https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/rankmirrors" \
|
RUN tee /etc/pacman.d/mirrorlist <<< 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' \
|
||||||
|
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
||||||
|
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch'
|
||||||
|
|
||||||
|
# Fixes issue with invalid GPG keys: update the archlinux-keyring package to get the latest keys, then remove and regenerate gnupg keys
|
||||||
|
RUN pacman -Sy archlinux-keyring --noconfirm \
|
||||||
|
&& rm -rf /etc/pacman.d/gnupg \
|
||||||
|
&& pacman-key --init \
|
||||||
|
&& pacman-key --populate archlinux
|
||||||
|
|
||||||
|
RUN if [[ "${RANKMIRRORS}" ]]; then \
|
||||||
|
{ pacman -Sy wget --noconfirm || pacman -Syu wget --noconfirm ; } \
|
||||||
|
; wget -O ./rankmirrors "https://raw.githubusercontent.com/sickcodes/Docker-OSX/${BRANCH:=master}/rankmirrors" \
|
||||||
; wget -O- "https://www.archlinux.org/mirrorlist/?country=${MIRROR_COUNTRY:-US}&protocol=https&use_mirror_status=on" \
|
; wget -O- "https://www.archlinux.org/mirrorlist/?country=${MIRROR_COUNTRY:-US}&protocol=https&use_mirror_status=on" \
|
||||||
| sed -e 's/^#Server/Server/' -e '/^#/d' \
|
| sed -e 's/^#Server/Server/' -e '/^#/d' \
|
||||||
| head -n "$((${MIRROR_COUNT:-10}+1))" \
|
| head -n "$((${MIRROR_COUNT:-10}+1))" \
|
||||||
| bash ./rankmirrors --verbose --max-time 5 - > /etc/pacman.d/mirrorlist \
|
| bash ./rankmirrors --verbose --max-time 5 - > /etc/pacman.d/mirrorlist \
|
||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirrors.evowise.com/archlinux/$repo/os/$arch' \
|
|
||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
|
||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
|
||||||
&& cat /etc/pacman.d/mirrorlist \
|
&& cat /etc/pacman.d/mirrorlist \
|
||||||
; fi
|
; fi
|
||||||
|
|
||||||
|
RUN tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkp://keyserver.ubuntu.com' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://hkps.pool.sks-keyservers.net:443' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkp://pgp.mit.edu:11371' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://keys.openpgp.org' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://keys.mailvelope.com'
|
||||||
|
|
||||||
# For taking screenshots of the Xfvb screen, useful during development.
|
# For taking screenshots of the Xfvb screen, useful during development.
|
||||||
ARG SCROT
|
ARG SCROT
|
||||||
|
|
||||||
@ -81,29 +97,7 @@ USER arch
|
|||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
#### libguestfs versioning
|
WORKDIR /home/arch/OSX-KVM
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
RUN sudo pacman -Syy \
|
|
||||||
&& sudo pacman -Rns linux --noconfirm \
|
|
||||||
; sudo pacman -S mkinitcpio --noconfirm \
|
|
||||||
&& sudo pacman -U "${KERNEL_PACKAGE_URL}" --noconfirm \
|
|
||||||
&& sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm \
|
|
||||||
&& rm -rf /var/tmp/.guestfs-* \
|
|
||||||
; libguestfs-test-tool || exit 1
|
|
||||||
|
|
||||||
####
|
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /home/arch/Docker-OSX/OSX-KVM
|
|
||||||
|
|
||||||
RUN mkdir -p ~/.ssh \
|
RUN mkdir -p ~/.ssh \
|
||||||
&& touch ~/.ssh/authorized_keys \
|
&& touch ~/.ssh/authorized_keys \
|
||||||
@ -118,7 +112,7 @@ RUN mkdir -p ~/.ssh \
|
|||||||
####
|
####
|
||||||
|
|
||||||
# symlink the old directory, for redundancy
|
# symlink the old directory, for redundancy
|
||||||
RUN ln -s /home/arch/Docker-OSX/OSX-KVM/OpenCore /home/arch/Docker-OSX/OSX-KVM/OpenCore-Catalina || true
|
RUN ln -s /home/arch/OSX-KVM/OpenCore /home/arch/OSX-KVM/OpenCore-Catalina || true
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
@ -180,9 +174,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/Docker-OSX/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/Docker-OSX/OSX-KVM/OpenCore/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}" \
|
||||||
@ -191,7 +185,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/Docker-OSX/OSX-KVM/OpenCore/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 ]] && { \
|
||||||
@ -205,6 +199,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/Docker-OSX/OSX-KVM/OpenCore/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
|
||||||
|
@ -18,41 +18,54 @@
|
|||||||
|
|
||||||
FROM sickcodes/docker-osx:latest
|
FROM sickcodes/docker-osx:latest
|
||||||
|
|
||||||
MAINTAINER 'https://twitter.com/sickcodes' <https://sick.codes>
|
LABEL maintainer='https://twitter.com/sickcodes <https://sick.codes>'
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
|
|
||||||
RUN rm -f /home/arch/Docker-OSX/OSX-KVM/mac_hdd_ng.img
|
RUN rm -f /home/arch/OSX-KVM/mac_hdd_ng.img
|
||||||
|
|
||||||
# For taking screenshots of the Xfvb screen, useful during development.
|
# For taking screenshots of the Xfvb screen, useful during development.
|
||||||
ARG SCROT
|
ARG SCROT
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
RUN tee /etc/pacman.d/mirrorlist <<< 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' \
|
||||||
|
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
||||||
|
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch'
|
||||||
|
|
||||||
|
# Fixes issue with invalid GPG keys: update the archlinux-keyring package to get the latest keys, then remove and regenerate gnupg keys
|
||||||
|
RUN pacman -Sy archlinux-keyring --noconfirm \
|
||||||
|
&& rm -rf /etc/pacman.d/gnupg \
|
||||||
|
&& pacman-key --init \
|
||||||
|
&& pacman-key --populate archlinux
|
||||||
|
|
||||||
RUN if [[ "${RANKMIRRORS}" ]]; then \
|
RUN if [[ "${RANKMIRRORS}" ]]; then \
|
||||||
{ pacman -Sy wget --noconfirm || pacman -Syu wget --noconfirm ; } \
|
{ pacman -Sy wget --noconfirm || pacman -Syu wget --noconfirm ; } \
|
||||||
; wget -O ./rankmirrors "https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/rankmirrors" \
|
; wget -O ./rankmirrors "https://raw.githubusercontent.com/sickcodes/Docker-OSX/${BRANCH:=master}/rankmirrors" \
|
||||||
; wget -O- "https://www.archlinux.org/mirrorlist/?country=${MIRROR_COUNTRY:-US}&protocol=https&use_mirror_status=on" \
|
; wget -O- "https://www.archlinux.org/mirrorlist/?country=${MIRROR_COUNTRY:-US}&protocol=https&use_mirror_status=on" \
|
||||||
| sed -e 's/^#Server/Server/' -e '/^#/d' \
|
| sed -e 's/^#Server/Server/' -e '/^#/d' \
|
||||||
| head -n "$((${MIRROR_COUNT:-10}+1))" \
|
| head -n "$((${MIRROR_COUNT:-10}+1))" \
|
||||||
| bash ./rankmirrors --verbose --max-time 5 - > /etc/pacman.d/mirrorlist \
|
| bash ./rankmirrors --verbose --max-time 5 - > /etc/pacman.d/mirrorlist \
|
||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirrors.evowise.com/archlinux/$repo/os/$arch' \
|
|
||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
|
||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
|
||||||
&& cat /etc/pacman.d/mirrorlist \
|
&& cat /etc/pacman.d/mirrorlist \
|
||||||
; fi \
|
; fi
|
||||||
; yes | pacman -Scc
|
|
||||||
|
RUN tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkp://keyserver.ubuntu.com' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://hkps.pool.sks-keyservers.net:443' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkp://pgp.mit.edu:11371' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://keys.openpgp.org' \
|
||||||
|
&& tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://keys.mailvelope.com'
|
||||||
|
|
||||||
# For taking screenshots of the Xfvb screen, useful during development.
|
# For taking screenshots of the Xfvb screen, useful during development.
|
||||||
ARG SCROT
|
ARG SCROT
|
||||||
|
|
||||||
RUN pacman -Syu xorg-server-xvfb wget xterm xorg-xhost xorg-xrandr sshpass --noconfirm \
|
RUN pacman -Syu xorg-server-xvfb wget xterm xorg-xhost xorg-xrandr --noconfirm \
|
||||||
&& if [[ "${SCROT}" ]]; then \
|
&& if [[ "${SCROT}" ]]; then \
|
||||||
pacman -Syu scrot base-devel --noconfirm \
|
pacman -Syu scrot base-devel --noconfirm \
|
||||||
&& git clone --recurse-submodules --depth 1 https://github.com/stolk/imcat.git \
|
&& git clone --recurse-submodules --depth 1 https://github.com/stolk/imcat.git \
|
||||||
@ -69,38 +82,14 @@ RUN pacman -Syu xorg-server-xvfb wget xterm xorg-xhost xorg-xrandr sshpass --noc
|
|||||||
; fi \
|
; fi \
|
||||||
; yes | pacman -Scc
|
; yes | pacman -Scc
|
||||||
|
|
||||||
|
RUN pacman -S sshpass --noconfirm \
|
||||||
|
&& yes | pacman -Scc
|
||||||
|
|
||||||
USER arch
|
USER arch
|
||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
#### libguestfs versioning
|
WORKDIR /home/arch/OSX-KVM
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# fix ad hoc errors from using the arch museum to get libguestfs
|
|
||||||
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 -U "${KERNEL_PACKAGE_URL}" --noconfirm || exit 1 \
|
|
||||||
&& sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm || exit 1 \
|
|
||||||
&& rm -rf /var/tmp/.guestfs-* \
|
|
||||||
&& yes | sudo pacman -Scc \
|
|
||||||
&& libguestfs-test-tool || exit 1 \
|
|
||||||
&& rm -rf /var/tmp/.guestfs-*
|
|
||||||
|
|
||||||
####
|
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /home/arch/Docker-OSX/OSX-KVM
|
|
||||||
|
|
||||||
RUN mkdir -p ~/.ssh \
|
RUN mkdir -p ~/.ssh \
|
||||||
&& touch ~/.ssh/authorized_keys \
|
&& touch ~/.ssh/authorized_keys \
|
||||||
@ -125,14 +114,14 @@ ARG IMAGE_URL=
|
|||||||
|
|
||||||
RUN if [[ "${COMPLETE}" ]]; then \
|
RUN if [[ "${COMPLETE}" ]]; then \
|
||||||
echo "Downloading your image... This step might take a while... Press Ctrl+C if you want to abort." \
|
echo "Downloading your image... This step might take a while... Press Ctrl+C if you want to abort." \
|
||||||
; rm -f /home/arch/Docker-OSX/OSX-KVM/mac_hdd_ng.img \
|
; rm -f /home/arch/OSX-KVM/mac_hdd_ng.img \
|
||||||
&& wget ${WGET_OPTIONS} -O /home/arch/Docker-OSX/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
|
# symlink the old directory, for redundancy
|
||||||
RUN ln -s /home/arch/Docker-OSX/OSX-KVM/OpenCore /home/arch/Docker-OSX/OSX-KVM/OpenCore-Catalina || true
|
RUN ln -s /home/arch/OSX-KVM/OpenCore /home/arch/OSX-KVM/OpenCore-Catalina || true
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
@ -201,9 +190,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/Docker-OSX/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/Docker-OSX/OSX-KVM/OpenCore/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}" \
|
||||||
@ -212,7 +201,7 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
--bootdisks \
|
--bootdisks \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/Docker-OSX/OSX-KVM/OpenCore/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 ]] && { \
|
||||||
@ -226,7 +215,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/Docker-OSX/OSX-KVM/OpenCore/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 \
|
||||||
|
1
OSX-KVM
1
OSX-KVM
Submodule OSX-KVM deleted from 307cdd7c98
129
README.md
129
README.md
@ -57,40 +57,31 @@ First time here? try [initial setup](#initial-setup), otherwise try the instruct
|
|||||||
### 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)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
qemu-img create -f qcow2 image.img 512G
|
|
||||||
|
|
||||||
docker run -it \
|
docker run -it \
|
||||||
--device /dev/kvm \
|
--device /dev/kvm \
|
||||||
-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}" \
|
||||||
-v "${PWD}/image.img:/image" \
|
|
||||||
sickcodes/docker-osx:latest
|
sickcodes/docker-osx:latest
|
||||||
|
|
||||||
# docker build -t docker-osx .
|
# docker build -t docker-osx .
|
||||||
# if you want to keep everything inside the container, remove "${PWD}/image.img:/image" which will tell the Dockerfile to use the image at /image
|
|
||||||
```
|
```
|
||||||
### Big Sur [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
### Big Sur [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
qemu-img create -f qcow2 image.img 512G
|
|
||||||
|
|
||||||
docker run -it \
|
docker run -it \
|
||||||
--device /dev/kvm \
|
--device /dev/kvm \
|
||||||
-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}" \
|
||||||
-v "${PWD}/image.img:/image" \
|
|
||||||
sickcodes/docker-osx:big-sur
|
sickcodes/docker-osx:big-sur
|
||||||
|
|
||||||
# docker build -t docker-osx --build-arg SHORTNAME=big-sur .
|
# docker build -t docker-osx --build-arg SHORTNAME=big-sur .
|
||||||
# if you want to keep everything inside the container, remove "${PWD}/image.img:/image" which will tell the Dockerfile to use the image at /image
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 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)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
qemu-img create -f qcow2 image.img 512G
|
|
||||||
|
|
||||||
docker run -it \
|
docker run -it \
|
||||||
--device /dev/kvm \
|
--device /dev/kvm \
|
||||||
@ -99,12 +90,45 @@ docker run -it \
|
|||||||
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
||||||
-e GENERATE_UNIQUE=true \
|
-e GENERATE_UNIQUE=true \
|
||||||
-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' \
|
||||||
-v "${PWD}/image.img:/image" \
|
|
||||||
sickcodes/docker-osx:monterey
|
sickcodes/docker-osx:monterey
|
||||||
|
|
||||||
# docker build -t docker-osx --build-arg SHORTNAME=monterey .
|
# docker build -t docker-osx --build-arg SHORTNAME=monterey .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Ventura [](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}" \
|
||||||
|
-e GENERATE_UNIQUE=true \
|
||||||
|
-e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \
|
||||||
|
sickcodes/docker-osx:ventura
|
||||||
|
|
||||||
|
# docker build -t docker-osx --build-arg SHORTNAME=ventura .
|
||||||
|
```
|
||||||
|
|
||||||
|
### Sonoma [](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}" \
|
||||||
|
-e GENERATE_UNIQUE=true \
|
||||||
|
-e CPU='Haswell-noTSX' \
|
||||||
|
-e CPUID_FLAGS='kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on' \
|
||||||
|
-e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-sonoma-custom.plist' \
|
||||||
|
sickcodes/docker-osx:sonoma
|
||||||
|
|
||||||
|
# docker build -t docker-osx --build-arg SHORTNAME=sonoma .
|
||||||
|
```
|
||||||
|
|
||||||
#### 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)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -129,14 +153,12 @@ docker run -it \
|
|||||||
### High Sierra [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
### High Sierra [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
qemu-img create -f qcow2 image.img 512G
|
|
||||||
|
|
||||||
docker run -it \
|
docker run -it \
|
||||||
--device /dev/kvm \
|
--device /dev/kvm \
|
||||||
-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}" \
|
||||||
-v "${PWD}/image.img:/image" \
|
|
||||||
sickcodes/docker-osx:high-sierra
|
sickcodes/docker-osx:high-sierra
|
||||||
|
|
||||||
# docker build -t docker-osx --build-arg SHORTNAME=high-sierra .
|
# docker build -t docker-osx --build-arg SHORTNAME=high-sierra .
|
||||||
@ -145,14 +167,12 @@ docker run -it \
|
|||||||
### Mojave [](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)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
qemu-img create -f qcow2 image.img 512G
|
|
||||||
|
|
||||||
docker run -it \
|
docker run -it \
|
||||||
--device /dev/kvm \
|
--device /dev/kvm \
|
||||||
-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}" \
|
||||||
-v "${PWD}/image.img:/image" \
|
|
||||||
sickcodes/docker-osx:mojave
|
sickcodes/docker-osx:mojave
|
||||||
|
|
||||||
# docker build -t docker-osx --build-arg SHORTNAME=mojave .
|
# docker build -t docker-osx --build-arg SHORTNAME=mojave .
|
||||||
@ -192,12 +212,15 @@ Enable SSH in network sharing inside the guest first. Change `-e "USERNAME=user"
|
|||||||
Since you can't see the screen, use the PLIST with nopicker, for example:
|
Since you can't see the screen, use the PLIST with nopicker, for example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget https://images2.sick.codes/mac_hdd_ng_auto.img
|
# Catalina
|
||||||
|
# wget https://images2.sick.codes/mac_hdd_ng_auto.img
|
||||||
|
# Monterey
|
||||||
|
wget https://images.sick.codes/mac_hdd_ng_auto_monterey.img
|
||||||
|
|
||||||
docker run -it \
|
docker run -it \
|
||||||
--device /dev/kvm \
|
--device /dev/kvm \
|
||||||
-p 50922:10022 \
|
-p 50922:10022 \
|
||||||
-v "${PWD}/mac_hdd_ng_auto.img:/image" \
|
-v "${PWD}/mac_hdd_ng_auto_monterey.img:/image" \
|
||||||
-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 "USERNAME=user" \
|
-e "USERNAME=user" \
|
||||||
@ -207,11 +230,22 @@ docker run -it \
|
|||||||
sickcodes/docker-osx:naked-auto
|
sickcodes/docker-osx:naked-auto
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Share directories, sharing files, shared folder, mount folder
|
||||||
|
The easiest and most secure way is `sshfs`
|
||||||
|
```bash
|
||||||
|
# on Linux/Windows
|
||||||
|
mkdir ~/mnt/osx
|
||||||
|
sshfs user@localhost:/ -p 50922 ~/mnt/osx
|
||||||
|
# wait a few seconds, and ~/mnt/osx will have full rootfs mounted over ssh, and in userspace
|
||||||
|
# automated: sshpass -p <password> sshfs user@localhost:/ -p 50922 ~/mnt/osx
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
# (VFIO) iPhone USB passthrough (VFIO)
|
# (VFIO) iPhone USB passthrough (VFIO)
|
||||||
|
|
||||||
If you have a laptop see the next usbfluxd section.
|
If you have a laptop see the next usbfluxd section.
|
||||||
|
|
||||||
If you have a desktop PC, you can use [@Silfalion](https://github.com/Silfalion)'s instructions : [https://github.com/Silfalion/Iphone_docker_osx_passthrough](https://github.com/Silfalion/Iphone_docker_osx_passthrough)
|
If you have a desktop PC, you can use [@Silfalion](https://github.com/Silfalion)'s instructions: [https://github.com/Silfalion/Iphone_docker_osx_passthrough](https://github.com/Silfalion/Iphone_docker_osx_passthrough)
|
||||||
|
|
||||||
# (USBFLUXD) iPhone USB -> Network style passthrough OSX-KVM Docker-OSX
|
# (USBFLUXD) iPhone USB -> Network style passthrough OSX-KVM Docker-OSX
|
||||||
|
|
||||||
@ -356,18 +390,22 @@ Pick one of these while **building**, irrelevant when using docker pull:
|
|||||||
--build-arg SHORTNAME=catalina
|
--build-arg SHORTNAME=catalina
|
||||||
--build-arg SHORTNAME=big-sur
|
--build-arg SHORTNAME=big-sur
|
||||||
--build-arg SHORTNAME=monterey
|
--build-arg SHORTNAME=monterey
|
||||||
|
--build-arg SHORTNAME=ventura
|
||||||
|
--build-arg SHORTNAME=sonoma
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Technical details
|
## Technical details
|
||||||
|
|
||||||
There currently multiple images, each with different use cases (explained [below](#container-images)):
|
There are currently multiple images, each with different use cases (explained [below](#container-images)):
|
||||||
|
|
||||||
- High Sierra
|
- High Sierra
|
||||||
- Mojave
|
- Mojave
|
||||||
- Catalina
|
- Catalina
|
||||||
- Big Sur
|
- Big Sur
|
||||||
- Monterey
|
- Monterey
|
||||||
|
- Ventura
|
||||||
|
- Sonoma
|
||||||
- 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)
|
||||||
@ -392,6 +430,14 @@ 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)
|
||||||
|
|
||||||
|
Ventura make your own image:
|
||||||
|
|
||||||
|
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
|
Sonoma make your own image:
|
||||||
|
|
||||||
|
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||||
|
|
||||||
Pre-made **Catalina** 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)
|
||||||
@ -472,7 +518,7 @@ In case you're interested, contact [@sickcodes on Twitter](https://twitter.com/s
|
|||||||
|
|
||||||
## License/Contributing
|
## License/Contributing
|
||||||
|
|
||||||
Docker-OSX is licensed under the [GPL v3+](LICENSE). Contributions are welcomed and immensely appreciated. You are in-fact permitted to use Docker-OSX as a tool to create proprietary software.
|
Docker-OSX is licensed under the [GPL v3+](LICENSE). Contributions are welcomed and immensely appreciated. You are in fact permitted to use Docker-OSX as a tool to create proprietary software.
|
||||||
|
|
||||||
### Other cool Docker/QEMU based projects
|
### Other cool Docker/QEMU based projects
|
||||||
- [Run Android in a Docker Container with Dock Droid](https://github.com/sickcodes/dock-droid)
|
- [Run Android in a Docker Container with Dock Droid](https://github.com/sickcodes/dock-droid)
|
||||||
@ -492,7 +538,7 @@ Product names, logos, brands and other trademarks referred to within this projec
|
|||||||
|
|
||||||
### Already set up or just looking to make a container quickly? Check out our [quick start](#quick-start-docker-osx) or see a bunch more use cases under our [container creation examples](#container-creation-examples) section.
|
### Already set up or just looking to make a container quickly? Check out our [quick start](#quick-start-docker-osx) or see a bunch more use cases under our [container creation examples](#container-creation-examples) section.
|
||||||
|
|
||||||
There are several different Docker-OSX images available which are suitable for different purposes.
|
There are several different Docker-OSX images available that are suitable for different purposes.
|
||||||
|
|
||||||
- `sickcodes/docker-osx:latest` - [I just want to try it out.](#quick-start-docker-osx)
|
- `sickcodes/docker-osx:latest` - [I just want to try it out.](#quick-start-docker-osx)
|
||||||
- `sickcodes/docker-osx:latest` - [I want to use Docker-OSX to develop/secure apps in Xcode (sign into Xcode, Transporter)](#quick-start-your-own-image-naked-container-image)
|
- `sickcodes/docker-osx:latest` - [I want to use Docker-OSX to develop/secure apps in Xcode (sign into Xcode, Transporter)](#quick-start-your-own-image-naked-container-image)
|
||||||
@ -504,6 +550,8 @@ Create your personal image using `:latest` or `big-sur`. Then, pull the image ou
|
|||||||
- `sickcodes/docker-osx:naked` - [I need iMessage/iCloud for security research.](#generating-serial-numbers)
|
- `sickcodes/docker-osx:naked` - [I need iMessage/iCloud for security research.](#generating-serial-numbers)
|
||||||
- `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:ventura` - [I want to run Ventura.](#quick-start-docker-osx)
|
||||||
|
- `sickcodes/docker-osx:sonoma` - [I want to run Sonoma.](#quick-start-docker-osx)
|
||||||
|
|
||||||
- `sickcodes/docker-osx:high-sierra` - I want to run High Sierra.
|
- `sickcodes/docker-osx:high-sierra` - I want to run High Sierra.
|
||||||
- `sickcodes/docker-osx:mojave` - I want to run Mojave.
|
- `sickcodes/docker-osx:mojave` - I want to run Mojave.
|
||||||
@ -552,7 +600,7 @@ wsl --install
|
|||||||
|
|
||||||
If you have previously installed WSL1, upgrade to WSL 2. Check [this link to upgrade from WSL1 to WSL2](https://docs.microsoft.com/en-us/windows/wsl/install#upgrade-version-from-wsl-1-to-wsl-2).
|
If you have previously installed WSL1, upgrade to WSL 2. Check [this link to upgrade from WSL1 to WSL2](https://docs.microsoft.com/en-us/windows/wsl/install#upgrade-version-from-wsl-1-to-wsl-2).
|
||||||
|
|
||||||
After WSL installation, go to `C:/Users/<Your_Name>/.wslconfig` and add `nestedVirtualization=true` to the end of the file (If the file doesn't exist, create it). You may need to select "Show Hidden Files" and "Show File Extensions" in File Explorer options.
|
After WSL installation, go to `C:/Users/<Your_Name>/.wslconfig` and add `nestedVirtualization=true` to the end of the file (If the file doesn't exist, create it). For more information about the `.wslconfig` file check [this link](https://docs.microsoft.com/en-us/windows/wsl/wsl-config#wslconfig). Verify that you have selected "Show Hidden Files" and "Show File Extensions" in File Explorer options.
|
||||||
The result should be like this:
|
The result should be like this:
|
||||||
```
|
```
|
||||||
[wsl2]
|
[wsl2]
|
||||||
@ -566,6 +614,8 @@ INFO: /dev/kvm exists
|
|||||||
KVM acceleration can be used
|
KVM acceleration can be used
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Use the command `sudo apt -y install bridge-utils cpu-checker libvirt-clients libvirt-daemon qemu qemu-kvm` to install it if it isn't.
|
||||||
|
|
||||||
Now download and install [Docker for Windows](https://docs.docker.com/desktop/windows/install/) if it is not already installed.
|
Now download and install [Docker for Windows](https://docs.docker.com/desktop/windows/install/) if it is not already installed.
|
||||||
|
|
||||||
After installation, go into Settings and check these 2 boxes:
|
After installation, go into Settings and check these 2 boxes:
|
||||||
@ -583,13 +633,21 @@ Finally, there are 3 ways to get video output:
|
|||||||
|
|
||||||
To use WSLg's built-in X-11 server, change these two lines in the docker run command to point Docker-OSX to WSLg.
|
To use WSLg's built-in X-11 server, change these two lines in the docker run command to point Docker-OSX to WSLg.
|
||||||
|
|
||||||
```bash
|
```
|
||||||
|
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
||||||
|
-v /mnt/wslg/.X11-unix:/tmp/.X11-unix \
|
||||||
|
```
|
||||||
|
Or try:
|
||||||
|
|
||||||
|
```
|
||||||
-e "DISPLAY=${DISPLAY:-:0}" \
|
-e "DISPLAY=${DISPLAY:-:0}" \
|
||||||
-v /mnt/wslg/.X11-unix:/tmp/.X11-unix \
|
-v /mnt/wslg/.X11-unix:/tmp/.X11-unix \
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For Ubuntu 20.x on Windows, see [https://github.com/sickcodes/Docker-OSX/discussions/458](https://github.com/sickcodes/Docker-OSX/discussions/458)
|
||||||
|
|
||||||
- VNC: See the [VNC section](#building-a-headless-container-which-allows-insecure-vnc-on-localhost-for-local-use-only) for more information. You could also add -vnc argument to qemu. Connect to your mac VM via a VNC Client. [Here is a how to](https://wiki.archlinux.org/title/QEMU#VNC)
|
- VNC: See the [VNC section](#building-a-headless-container-which-allows-insecure-vnc-on-localhost-for-local-use-only) for more information. You could also add -vnc argument to qemu. Connect to your mac VM via a VNC Client. [Here is a how to](https://wiki.archlinux.org/title/QEMU#VNC)
|
||||||
- Desktop Environment: This will give you a full desktop linux experiencem but it will use a bit more of the computer's resources. Here is an example guide, but there are other guides that help set up a desktop environment. [DE Example](https://www.makeuseof.com/tag/linux-desktop-windows-subsystem/)
|
- Desktop Environment: This will give you a full desktop linux experience but it will use a bit more of the computer's resources. Here is an example guide, but there are other guides that help set up a desktop environment. [DE Example](https://www.makeuseof.com/tag/linux-desktop-windows-subsystem/)
|
||||||
|
|
||||||
## 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)
|
||||||
|
|
||||||
@ -648,15 +706,17 @@ Or
|
|||||||
|
|
||||||
#### Use more CPU Cores/SMP
|
#### Use more CPU Cores/SMP
|
||||||
|
|
||||||
This will use all available cores; adjust accordingly to the day of the week:
|
Examples:
|
||||||
|
|
||||||
```
|
`-e EXTRA='-smp 6,sockets=3,cores=2'`
|
||||||
-e CPU_STRING=$(nproc) \
|
|
||||||
```
|
|
||||||
|
|
||||||
This will use `-smp $(nproc)`
|
`-e EXTRA='-smp 8,sockets=4,cores=2'`
|
||||||
|
|
||||||
### Confirm your user is part of the the Docker group, KVM group, libvirt group
|
`-e EXTRA='-smp 16,sockets=8,cores=2'`
|
||||||
|
|
||||||
|
Note, unlike memory, CPU usage is shared. so you can allocate all of your CPU's to the container.
|
||||||
|
|
||||||
|
### Confirm your user is part of the Docker group, KVM group, libvirt group
|
||||||
|
|
||||||
#### Add yourself to the Docker group
|
#### Add yourself to the Docker group
|
||||||
|
|
||||||
@ -1008,7 +1068,7 @@ IP_ADDRESS=172.17.0.1
|
|||||||
|
|
||||||
### Fedora: enable internet connectivity with a bridged network
|
### Fedora: enable internet connectivity with a bridged network
|
||||||
|
|
||||||
Fedora's default firewall settings may prevent Docker's network interface from reaching the internet. In order to reoslve this, you will need to whitelist the interface in your firewall:
|
Fedora's default firewall settings may prevent Docker's network interface from reaching the internet. In order to resolve this, you will need to whitelist the interface in your firewall:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Set the docker0 bridge to the trusted zone
|
# Set the docker0 bridge to the trusted zone
|
||||||
@ -1370,7 +1430,7 @@ docker run -it \
|
|||||||
sickcodes/docker-osx:latest
|
sickcodes/docker-osx:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Here's a few other resolutions! If you resolution is invalid, it will default to 800x600.
|
Here's a few other resolutions! If your resolution is invalid, it will default to 800x600.
|
||||||
|
|
||||||
```
|
```
|
||||||
-e WIDTH=800 \
|
-e WIDTH=800 \
|
||||||
@ -1548,7 +1608,7 @@ Important Note: this will cause the host system to lose access to the USB device
|
|||||||
|
|
||||||
This is my favourite container. You can supply an existing disk image as a Docker command line argument.
|
This is my favourite container. You can supply an existing disk image as a Docker command line argument.
|
||||||
|
|
||||||
- Pull images out using `sudo find /var/lib/docker -size +10G | grep mac_hdd_ng.img`
|
- Pull images out using `sudo find /var/lib/docker -name mac_hdd_ng.img -size +10G`
|
||||||
|
|
||||||
- Supply your own local image with the command argument `-v "${PWD}/mac_hdd_ng.img:/image"` and use `sickcodes/docker-osx:naked` when instructing Docker to create your container.
|
- Supply your own local image with the command argument `-v "${PWD}/mac_hdd_ng.img:/image"` and use `sickcodes/docker-osx:naked` when instructing Docker to create your container.
|
||||||
|
|
||||||
@ -1659,7 +1719,7 @@ docker run -it \
|
|||||||
sickcodes/docker-osx:naked
|
sickcodes/docker-osx:naked
|
||||||
```
|
```
|
||||||
|
|
||||||
### Building a headless container which allows insecure VNC on localhost (!for local use only!)
|
### Building a headless container that allows insecure VNC on localhost (!for local use only!)
|
||||||
|
|
||||||
**Must change -it to -i to be able to interact with the QEMU console**
|
**Must change -it to -i to be able to interact with the QEMU console**
|
||||||
|
|
||||||
@ -1704,7 +1764,7 @@ You also need the container IP: `docker inspect <containerid> | jq -r '.[0].Netw
|
|||||||
|
|
||||||
Or `ip n` will usually show the container IP first.
|
Or `ip n` will usually show the container IP first.
|
||||||
|
|
||||||
Now VNC connect using the Docker container IP, for example `172.17.0.2:5999`
|
Now VNC connects using the Docker container IP, for example `172.17.0.2:5999`
|
||||||
|
|
||||||
Remote VNC over SSH: `ssh -N root@1.1.1.1 -L 5999:172.17.0.2:5999`, where `1.1.1.1` is your remote server IP and `172.17.0.2` is your LAN container IP.
|
Remote VNC over SSH: `ssh -N root@1.1.1.1 -L 5999:172.17.0.2:5999`, where `1.1.1.1` is your remote server IP and `172.17.0.2` is your LAN container IP.
|
||||||
|
|
||||||
@ -1864,4 +1924,3 @@ You may when initialising or booting into a container see errors from the `(qemu
|
|||||||
`ALSA lib blahblahblah: (function name) returned error: no such file or directory`. These are more or less expected. As long as you are able to boot into the container and everything is working, no reason to worry about these.
|
`ALSA lib blahblahblah: (function name) returned error: no such file or directory`. These are more or less expected. As long as you are able to boot into the container and everything is working, no reason to worry about these.
|
||||||
|
|
||||||
See also: [here](https://github.com/sickcodes/Docker-OSX/issues/174).
|
See also: [here](https://github.com/sickcodes/Docker-OSX/issues/174).
|
||||||
|
|
||||||
|
Submodule osx-serial-generator updated: a9e2b126db...908b3d687a
@ -16,6 +16,8 @@
|
|||||||
# scrot -o catalina_master.png
|
# scrot -o catalina_master.png
|
||||||
# scrot -o big-sur_master.png
|
# scrot -o big-sur_master.png
|
||||||
# scrot -o monterey_master.png
|
# scrot -o monterey_master.png
|
||||||
|
# scrot -o ventura_master.png
|
||||||
|
# scrot --overwrite --display :99 --file ~/${TEST}.png
|
||||||
# pull off remote server to the tests folder
|
# pull off remote server to the tests folder
|
||||||
# REMOTE_SERVER=
|
# REMOTE_SERVER=
|
||||||
# scp root@"${REMOTE_SERVER}":~/*_master.png .
|
# scp root@"${REMOTE_SERVER}":~/*_master.png .
|
||||||
@ -28,6 +30,8 @@ TESTS=(
|
|||||||
catalina
|
catalina
|
||||||
big-sur
|
big-sur
|
||||||
monterey
|
monterey
|
||||||
|
ventura
|
||||||
|
sonoma
|
||||||
)
|
)
|
||||||
|
|
||||||
# test each docker image to see if they boot to their unique respective installation screens.
|
# test each docker image to see if they boot to their unique respective installation screens.
|
||||||
|
BIN
tests/sonoma_master.png
Normal file
BIN
tests/sonoma_master.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 132 KiB |
@ -119,6 +119,12 @@ MIRROR_COUNTRY="${MIRROR_COUNTRY:=US}"
|
|||||||
NO_CACHE="${NO_CACHE:=--no-cache}"
|
NO_CACHE="${NO_CACHE:=--no-cache}"
|
||||||
|
|
||||||
|
|
||||||
|
TEST_BUILDS=(
|
||||||
|
'docker-osx:naked'
|
||||||
|
'docker-osx:naked-auto'
|
||||||
|
'docker-osx:auto'
|
||||||
|
)
|
||||||
|
|
||||||
TEST_BUILDS=(
|
TEST_BUILDS=(
|
||||||
'docker-osx:naked'
|
'docker-osx:naked'
|
||||||
'docker-osx:naked-auto'
|
'docker-osx:naked-auto'
|
||||||
@ -131,13 +137,30 @@ VERSION_BUILDS=(
|
|||||||
'catalina'
|
'catalina'
|
||||||
'big-sur'
|
'big-sur'
|
||||||
'monterey'
|
'monterey'
|
||||||
|
'ventura'
|
||||||
|
'sonoma'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
warning () {
|
||||||
|
clear
|
||||||
|
for j in {15..1}; do
|
||||||
|
echo "############# WARNING: THIS SCRIPT IS NOT INTENDED FOR USE BY ################"
|
||||||
|
echo "############# IT IS USED BY THE PROJECT TO BUILD AND PUSH TO DOCKERHUB #######"
|
||||||
|
echo ""
|
||||||
|
echo " Press Ctrl C to stop. "
|
||||||
|
MAX_COLS=$((${COLUMNS}/2))
|
||||||
|
printf "$j %.0s" {1..20}
|
||||||
|
echo
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
install_docker () {
|
install_docker () {
|
||||||
apt remove docker docker-engine docker.io containerd runc -y \
|
apt remove docker docker-engine docker.io containerd runc -y \
|
||||||
; apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y \
|
; apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y \
|
||||||
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
|
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
|
||||||
&& apt-key fingerprint 0EBFCD88 \
|
&& apt-key fingerprint 0EBFCD88 \
|
||||||
|
&& > /etc/apt/sources.list.d/docker.list \
|
||||||
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
|
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
|
||||||
&& apt update -y \
|
&& apt update -y \
|
||||||
&& apt install docker-ce docker-ce-cli containerd.io -y \
|
&& apt install docker-ce docker-ce-cli containerd.io -y \
|
||||||
@ -270,6 +293,7 @@ EOF
|
|||||||
systemctl enable --now docker
|
systemctl enable --now docker
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warning
|
||||||
tee -a ~/.bashrc <<EOF
|
tee -a ~/.bashrc <<EOF
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
export TZ=UTC
|
export TZ=UTC
|
||||||
@ -285,13 +309,15 @@ 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
|
||||||
|
apt install xvfb -y
|
||||||
start_xvfb
|
start_xvfb
|
||||||
# start_vnc
|
# start_vnc
|
||||||
enable_kvm
|
enable_kvm
|
||||||
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
|
||||||
|
git pull
|
||||||
|
|
||||||
for SHORTNAME in "${VERSION_BUILDS[@]}"; do
|
for SHORTNAME in "${VERSION_BUILDS[@]}"; do
|
||||||
docker-osx:version "${SHORTNAME}"
|
docker-osx:version "${SHORTNAME}"
|
||||||
@ -312,6 +338,10 @@ if [[ "${DOCKER_USERNAME}" ]] && [[ "${DOCKER_PASSWORD}" ]]; then
|
|||||||
docker push "sickcodes/docker-osx:${SHORTNAME}"
|
docker push "sickcodes/docker-osx:${SHORTNAME}"
|
||||||
done \
|
done \
|
||||||
&& touch PUSHED
|
&& touch PUSHED
|
||||||
|
docker push sickcodes/docker-osx:naked
|
||||||
|
docker push sickcodes/docker-osx:auto
|
||||||
|
docker push sickcodes/docker-osx:naked-auto
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# connect remotely to your server to use VNC
|
# connect remotely to your server to use VNC
|
||||||
|
BIN
tests/ventura_master.png
Normal file
BIN
tests/ventura_master.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 194 KiB |
@ -93,10 +93,13 @@ RUN if [[ "${RANKMIRRORS}" ]]; then { pacman -Sy wget --noconfirm || pacman -Syu
|
|||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
||||||
&& cat /etc/pacman.d/mirrorlist ; fi
|
&& cat /etc/pacman.d/mirrorlist ; fi
|
||||||
|
|
||||||
|
# Fixes issue with invalid GPG keys: update the archlinux-keyring package to get the latest keys, then remove and regenerate gnupg keys
|
||||||
|
RUN pacman -Sy archlinux-keyring --noconfirm && rm -rf /etc/pacman.d/gnupg && pacman-key --init && pacman-key --populate
|
||||||
|
|
||||||
USER arch
|
USER arch
|
||||||
|
|
||||||
RUN sudo pacman -Syyuu --noconfirm \
|
RUN yes | sudo pacman -Syyuu --noconfirm \
|
||||||
&& sudo pacman -S tigervnc xterm xorg-xhost xdotool ufw --noconfirm \
|
&& yes | sudo pacman -S tigervnc xterm xorg-xhost xdotool ufw --noconfirm \
|
||||||
&& mkdir -p ${HOME}/.vnc \
|
&& mkdir -p ${HOME}/.vnc \
|
||||||
&& touch ~/.vnc/config \
|
&& touch ~/.vnc/config \
|
||||||
&& tee -a ~/.vnc/config <<< 'geometry=1920x1080' \
|
&& tee -a ~/.vnc/config <<< 'geometry=1920x1080' \
|
||||||
|
@ -57,12 +57,6 @@ RUN if [[ "${RANKMIRRORS}" ]]; then { pacman -Sy wget --noconfirm || pacman -Syu
|
|||||||
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
&& tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch' \
|
||||||
&& cat /etc/pacman.d/mirrorlist ; fi
|
&& cat /etc/pacman.d/mirrorlist ; fi
|
||||||
|
|
||||||
# TEMP-FIX for pacman issue
|
|
||||||
RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst \
|
|
||||||
&& curl -LO "https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/${patched_glibc}" \
|
|
||||||
&& bsdtar -C / -xvf "${patched_glibc}" || echo "Everything is fine."
|
|
||||||
# TEMP-FIX for pacman issue
|
|
||||||
|
|
||||||
# For taking screenshots of the Xfvb screen, useful during development.
|
# For taking screenshots of the Xfvb screen, useful during development.
|
||||||
ARG SCROT
|
ARG SCROT
|
||||||
|
|
||||||
@ -83,12 +77,6 @@ RUN pacman -Syu xorg-server-xvfb wget xterm xorg-xhost xorg-xrandr sshpass --noc
|
|||||||
; fi \
|
; fi \
|
||||||
; yes | pacman -Scc
|
; yes | pacman -Scc
|
||||||
|
|
||||||
# TEMP-FIX for pacman issue
|
|
||||||
RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst \
|
|
||||||
&& curl -LO "https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/${patched_glibc}" \
|
|
||||||
&& bsdtar -C / -xvf "${patched_glibc}" || echo "Everything is fine."
|
|
||||||
# TEMP-FIX for pacman issue
|
|
||||||
|
|
||||||
USER arch
|
USER arch
|
||||||
|
|
||||||
WORKDIR /home/arch/OSX-KVM
|
WORKDIR /home/arch/OSX-KVM
|
||||||
@ -192,21 +180,14 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/
|
|||||||
|
|
||||||
WORKDIR /home/arch/OSX-KVM
|
WORKDIR /home/arch/OSX-KVM
|
||||||
|
|
||||||
RUN sudo pacman -Syyuu --noconfirm \
|
RUN yes | sudo pacman -Syyuu --noconfirm \
|
||||||
&& sudo pacman -S tigervnc xterm xorg-xhost xdotool ufw --noconfirm \
|
&& yes | sudo pacman -S tigervnc xterm xorg-xhost xdotool ufw --noconfirm \
|
||||||
&& mkdir -p ${HOME}/.vnc \
|
&& mkdir -p ${HOME}/.vnc \
|
||||||
&& touch ~/.vnc/config \
|
&& touch ~/.vnc/config \
|
||||||
&& tee -a ~/.vnc/config <<< 'geometry=1920x1080' \
|
&& tee -a ~/.vnc/config <<< 'geometry=1920x1080' \
|
||||||
&& tee -a ~/.vnc/config <<< 'localhost' \
|
&& tee -a ~/.vnc/config <<< 'localhost' \
|
||||||
&& tee -a ~/.vnc/config <<< 'alwaysshared'
|
&& tee -a ~/.vnc/config <<< 'alwaysshared'
|
||||||
|
|
||||||
# TEMP-FIX for file 5.40 libguestfs issue
|
|
||||||
RUN yes | sudo pacman -U https://archive.archlinux.org/packages/f/file/file-5.39-1-x86_64.pkg.tar.zst \
|
|
||||||
&& patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst \
|
|
||||||
&& curl -LO "https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/${patched_glibc}" \
|
|
||||||
&& bsdtar -C / -xvf "${patched_glibc}" || echo "Everything is fine."
|
|
||||||
# TEMP-FIX for file 5.40 libguestfs issue
|
|
||||||
|
|
||||||
RUN printf '\n%s\n' \
|
RUN printf '\n%s\n' \
|
||||||
'sudo rm -f /tmp/.X99-lock' \
|
'sudo rm -f /tmp/.X99-lock' \
|
||||||
'export DISPLAY=:99' \
|
'export DISPLAY=:99' \
|
||||||
|
Reference in New Issue
Block a user