You've already forked Docker-OSX
mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2025-07-01 18:32:35 -05:00
Compare commits
61 Commits
ventura
...
e962dce97f
Author | SHA1 | Date | |
---|---|---|---|
e962dce97f | |||
2d4cc60572 | |||
730d6f294a | |||
93c2119ebc | |||
fb8aa4b248 | |||
b5a70782cc | |||
61b21421f6 | |||
342c09eb2a | |||
2dc1d615b1 | |||
19915de799 | |||
a1df7c5a65 | |||
55fe01bb97 | |||
7c635c0d20 | |||
b653f292a5 | |||
c1b834fbb0 | |||
d13bae59e4 | |||
1c10fc4301 | |||
0c8e5f3923 | |||
9a229b87ce | |||
476de8d2d1 | |||
42263d90fc | |||
756a1c03b9 | |||
37aad0460d | |||
54c96557c0 | |||
e17ee6c90a | |||
a208578bf0 | |||
88343e730c | |||
a13f61bded | |||
d09fa38b47 | |||
b09155a612 | |||
669bea269d | |||
d3129a83d5 | |||
846cf8fdaf | |||
bc0be6b6c7 | |||
bb1e992916 | |||
51f1c1ce14 | |||
ac3fe529a8 | |||
0daf0ff5d4 | |||
8f555f085d | |||
924fa68088 | |||
237a286e44 | |||
de142e8e49 | |||
fc8f78ff0f | |||
6dc83cebc2 | |||
9b10a306db | |||
fbe5dba618 | |||
2265bb5a3f | |||
86452e6da3 | |||
e612ca3229 | |||
dab7fc884c | |||
c0ea46aab5 | |||
bb75dc4669 | |||
9aac2dbe7f | |||
cedfbf521c | |||
671c46046a | |||
917e091798 | |||
f794cac0e2 | |||
e0d753030b | |||
a43fc57188 | |||
ab54b75ab8 | |||
e6763761c0 |
52
.github/workflows/docker-build.yml
vendored
Normal file
52
.github/workflows/docker-build.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
name: Push Docker Image to Docker Hub
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
push_to_docker_hub:
|
||||
name: Push Docker Image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
id: checkout_code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
id: login_docker_hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USER_NAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
|
||||
- name: Echo Docker Hub Username
|
||||
run: echo ${{ secrets.DOCKER_HUB_USER_NAME }}
|
||||
|
||||
- name: Echo GitHub SHA
|
||||
run: echo $GITHUB_SHA
|
||||
|
||||
- name: Build Docker image
|
||||
id: build_image
|
||||
run: |
|
||||
docker build "$GITHUB_WORKSPACE" -t sickcodes/docker-osx:master --label dockerfile-path="Dockerfile"
|
||||
|
||||
- name: Label Master Docker Image as Latest
|
||||
id: label_image
|
||||
run: |
|
||||
docker tag sickcodes/docker-osx:master sickcodes/docker-osx:latest
|
||||
|
||||
- name: Push Docker image master
|
||||
id: push_master
|
||||
run: docker push sickcodes/docker-osx:master
|
||||
|
||||
- name: Push Docker image latest
|
||||
id: push_latest
|
||||
run: docker push sickcodes/docker-osx:latest
|
||||
|
||||
- name: Logout from Docker Hub
|
||||
run: docker logout
|
||||
|
||||
- name: End
|
||||
run: echo "Docker image pushed to Docker Hub successfully"
|
@ -30,7 +30,7 @@ This project now uses the fantastic OpenCore bootloader from the community OpenC
|
||||
|
||||
[@jviotti](https://github.com/jviotti) - Auto-boot thru ShowPicker
|
||||
|
||||
[@MrBenFTW](https://github.com/MrBenFTW) - Updated macOS version 10.15.5 -> 10.15.6, Enabled screen sharing port forwarding, Removed the need to remove 1gb from the partition.
|
||||
[@IAmBenMitchell]([https://github.com/MrBenFTW](https://github.com/iambenmitchell)) - Updated macOS version 10.15.5 -> 10.15.6, Enabled screen sharing port forwarding, Removed the need to remove 1gb from the partition.
|
||||
|
||||
[@hoantp](https://github.com/hoantp) - Initialized TigerVNC 1.11.0 fix
|
||||
|
||||
@ -127,5 +127,7 @@ This project now uses the fantastic OpenCore bootloader from the community OpenC
|
||||
[@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
|
||||
|
||||
[@Anthropohedron](https://github.com/Anthropohedron) Added FAQ.md
|
||||
|
||||
|
83
Dockerfile
83
Dockerfile
@ -24,6 +24,7 @@
|
||||
#
|
||||
# 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-sonoma --build-arg BRANCH=sonoma --build-arg SHORTNAME=sonoma .
|
||||
#
|
||||
# Basic Run:
|
||||
#
|
||||
@ -58,31 +59,36 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
# change disk size here or add during build, e.g. --build-arg VERSION=10.14.5 --build-arg SIZE=50G
|
||||
ARG SIZE=200G
|
||||
ARG PARALLEL_DOWNLOADS=30
|
||||
|
||||
# OPTIONAL: Arch Linux server mirrors for super fast builds
|
||||
# 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 MIRROR_COUNTRY=US
|
||||
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 \
|
||||
{ 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" \
|
||||
| sed -e 's/^#Server/Server/' -e '/^#/d' \
|
||||
| head -n "$((${MIRROR_COUNT:-10}+1))" \
|
||||
| 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
|
||||
|
||||
# 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
|
||||
|
||||
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' \
|
||||
@ -122,8 +128,7 @@ RUN tee -a sshd_config <<< 'AllowTcpForwarding yes' \
|
||||
|
||||
USER arch
|
||||
|
||||
# download OSX-KVM
|
||||
# RUN git clone --recurse-submodules --depth 1 https://github.com/kholia/OSX-KVM.git /home/arch/OSX-KVM
|
||||
# download OSX-KVM for the submodules
|
||||
RUN git clone --recurse-submodules --depth 1 https://github.com/kholia/OSX-KVM.git /home/arch/OSX-KVM
|
||||
|
||||
# enable ssh
|
||||
@ -149,37 +154,33 @@ 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 bc qemu-desktop 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
|
||||
|
||||
WORKDIR /home/arch/OSX-KVM
|
||||
|
||||
# RUN wget https://raw.githubusercontent.com/kholia/OSX-KVM/master/fetch-macOS-v2.py
|
||||
|
||||
ARG SHORTNAME=catalina
|
||||
|
||||
RUN make \
|
||||
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c BaseSystem.img \
|
||||
&& rm ./BaseSystem.dmg
|
||||
|
||||
# fix invalid signature on old libguestfs
|
||||
ARG SIGLEVEL=Never
|
||||
|
||||
RUN sudo tee -a /etc/pacman.conf <<< "SigLevel = ${SIGLEVEL}"
|
||||
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
|
||||
|
||||
# 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 \
|
||||
sudo pacman -Syu linux archlinux-keyring guestfs-tools --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
|
||||
|
||||
# optional --build-arg to change branches for testing
|
||||
ARG BRANCH=master
|
||||
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}" "${REPO}"
|
||||
RUN git clone --recurse-submodules --depth 1 --branch "${BRANCH:=master}" "${REPO:=https://github.com/sickcodes/Docker-OSX.git}"
|
||||
|
||||
RUN touch Launch.sh \
|
||||
&& chmod +x ./Launch.sh \
|
||||
@ -194,7 +195,8 @@ 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 <<< '-machine q35,${KVM-"accel=kvm:tcg"} \' \
|
||||
&& 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 <<< '-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/OSX-KVM/OVMF_VARS-1024x768.fd \' \
|
||||
@ -226,23 +228,7 @@ RUN grep -v InstallMedia ./Launch.sh > ./Launch-nopicker.sh \
|
||||
|
||||
USER arch
|
||||
|
||||
ENV USER arch
|
||||
|
||||
# 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 tee -a /etc/pacman.conf <<< 'RemoteFileSigLevel = Optional' \
|
||||
&& sudo pacman -Syy \
|
||||
&& sudo pacman -Rns linux --noconfirm \
|
||||
&& sudo pacman -S mkinitcpio pcre pcre2 --noconfirm \
|
||||
&& sudo pacman -S linux linux-headers --noconfirm || exit 1 \
|
||||
&& rm -rf /var/tmp/.guestfs-* \
|
||||
&& yes | sudo pacman -Scc \
|
||||
&& export SUPERMIN_KERNEL_VERSION="$(uname -r)" \
|
||||
&& export SUPERMIN_MODULES="/lib/modules/$(uname -r)" \
|
||||
&& export SUPERMIN_KERNEL=/boot/vmlinuz-linux \
|
||||
&& libguestfs-test-tool || exit 1 \
|
||||
&& rm -rf /var/tmp/.guestfs-*
|
||||
ENV USER=arch
|
||||
|
||||
# These are hardcoded serials for non-iMessage related research
|
||||
# Overwritten by using GENERATE_UNIQUE=true
|
||||
@ -367,7 +353,20 @@ VOLUME ["/tmp/.X11-unix"]
|
||||
# the default serial numbers are already contained in ./OpenCore/OpenCore.qcow2
|
||||
# And the default serial numbers
|
||||
|
||||
CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
||||
# DMCA compliant download process
|
||||
# If BaseSystem.img does not exist, download ${SHORTNAME}
|
||||
|
||||
# shortname default is below
|
||||
ENV SHORTNAME=sequoia
|
||||
|
||||
ENV BASESYSTEM_IMAGE=BaseSystem.img
|
||||
|
||||
CMD ! [[ -e "${BASESYSTEM_IMAGE:-BaseSystem.img}" ]] \
|
||||
&& printf '%s\n' "No BaseSystem.img available, downloading ${SHORTNAME}" \
|
||||
&& make \
|
||||
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c ${BASESYSTEM_IMAGE:-BaseSystem.img} \
|
||||
&& rm ./BaseSystem.dmg \
|
||||
; 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 \
|
||||
; [[ "${NOPICKER}" == true ]] && { \
|
||||
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
||||
|
@ -53,24 +53,40 @@ ARG SCROT
|
||||
|
||||
# OPTIONAL: Arch Linux server mirrors for super fast builds
|
||||
# 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 MIRROR_COUNTRY=US
|
||||
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 \
|
||||
{ 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" \
|
||||
| sed -e 's/^#Server/Server/' -e '/^#/d' \
|
||||
| head -n "$((${MIRROR_COUNT:-10}+1))" \
|
||||
| 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
|
||||
|
||||
|
||||
|
||||
&& 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 \
|
||||
pacman -Syu scrot base-devel --noconfirm \
|
||||
@ -95,34 +111,6 @@ 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-*
|
||||
|
||||
####
|
||||
|
||||
|
||||
WORKDIR /home/arch/OSX-KVM
|
||||
|
||||
RUN mkdir -p ~/.ssh \
|
||||
@ -218,7 +206,20 @@ ENV TERMS_OF_USE=i_agree
|
||||
|
||||
ENV BOILERPLATE="By using this Dockerfile, you hereby agree that you are a security reseacher or developer and agree to use this Dockerfile to make the world a safer place. Examples include: making your apps safer, finding your mobile phone, compiling security products, etc. You understand that Docker-OSX is an Open Source project, which is released to the public under the GNU Pulic License version 3 and above. You acknowledge that the Open Source project is absolutely unaffiliated with any third party, in any form whatsoever. Any trademarks or intelectual property which happen to be mentioned anywhere in or around the project are owned by their respective owners. By using this Dockerfile, you agree to agree to the EULA of each piece of upstream or downstream software. The following code is released for the sole purpose of security research, under the GNU Public License version 3. If you are concerned about the licensing, please note that this project is not AGPL. A copy of the license is available online: https://github.com/sickcodes/Docker-OSX/blob/master/LICENSE. In order to use the following Dockerfile you must read and understand the terms. Once you have read the terms, use the -e TERMS_OF_USE=i_agree or -e TERMS_OF_USE=i_disagree"
|
||||
|
||||
CMD echo "${BOILERPLATE}" \
|
||||
# DMCA compliant download process
|
||||
# If BaseSystem.img does not exist, download ${SHORTNAME}
|
||||
|
||||
# shortname default is catalina, which means :latest is catalina
|
||||
ENV SHORTNAME=sonoma
|
||||
|
||||
ENV BASESYSTEM_IMAGE=BaseSystem.img
|
||||
|
||||
CMD ! [[ -e "${BASESYSTEM_IMAGE:-BaseSystem.img}" ]] \
|
||||
&& printf '%s\n' "No BaseSystem.img available, downloading ${SHORTNAME}" \
|
||||
&& make \
|
||||
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c ${BASESYSTEM_IMAGE:-BaseSystem.img} \
|
||||
&& rm ./BaseSystem.dmg \
|
||||
; echo "${BOILERPLATE}" \
|
||||
; [[ "${TERMS_OF_USE}" = i_agree ]] || exit 1 \
|
||||
; echo "Disk is being copied between layers... Please wait a minute..." \
|
||||
; sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
||||
|
@ -1,255 +0,0 @@
|
||||
#!/usr/bin/docker
|
||||
# ____ __ ____ ______ __
|
||||
# / __ \____ _____/ /_____ _____/ __ \/ ___/ |/ /
|
||||
# / / / / __ \/ ___/ //_/ _ \/ ___/ / / /\__ \| /
|
||||
# / /_/ / /_/ / /__/ ,< / __/ / / /_/ /___/ / |
|
||||
# /_____/\____/\___/_/|_|\___/_/ \____//____/_/|_| [MONTEREY]
|
||||
#
|
||||
# Title: Docker-OSX (Mac on Docker)
|
||||
# Author: Sick.Codes https://twitter.com/sickcodes
|
||||
# Version: 6.0
|
||||
# License: GPLv3+
|
||||
# Repository: https://github.com/sickcodes/Docker-OSX
|
||||
# Website: https://sick.codes
|
||||
#
|
||||
# Notes: Uses a self-hosted BaseSystem.img from a USB installer.
|
||||
# If you want to DIY, use https://github.com/corpnewt/gibMacOS
|
||||
# Set seed as developer, and install the Install Assistant on Big Sur
|
||||
# Burn to a USB, and pull out BaseSystem.img
|
||||
# Or download from https://images.sick.codes/BaseSystem_Monterey.dmg
|
||||
#
|
||||
|
||||
FROM sickcodes/docker-osx
|
||||
|
||||
LABEL maintainer='https://twitter.com/sickcodes <https://sick.codes>'
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
# change disk size here or add during build, e.g. --build-arg VERSION=10.14.5 --build-arg SIZE=50G
|
||||
ARG SIZE=200G
|
||||
ARG BASE_SYSTEM='https://images.sick.codes/BaseSystem_Monterey.dmg'
|
||||
|
||||
WORKDIR /home/arch/OSX-KVM
|
||||
|
||||
RUN wget -O BaseSystem.dmg "${BASE_SYSTEM}" \
|
||||
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c BaseSystem.img \
|
||||
&& rm -f BaseSystem.dmg
|
||||
|
||||
RUN qemu-img create -f qcow2 /home/arch/OSX-KVM/mac_hdd_ng.img "${SIZE}"
|
||||
|
||||
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
|
||||
|
||||
# required to use libguestfs inside a docker container, to create bootdisks for docker-osx on-the-fly
|
||||
RUN if [[ "${LINUX}" == true ]]; then \
|
||||
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
|
||||
|
||||
####
|
||||
|
||||
|
||||
# optional --build-arg to change branches for testing
|
||||
ARG BRANCH=master
|
||||
ARG REPO='https://github.com/sickcodes/Docker-OSX.git'
|
||||
# RUN git clone --recurse-submodules --depth 1 --branch "${BRANCH}" "${REPO}"
|
||||
RUN rm -rf ./Docker-OSX \
|
||||
&& git clone --recurse-submodules --depth 1 --branch "${BRANCH}" "${REPO}"
|
||||
|
||||
RUN touch Launch.sh \
|
||||
&& chmod +x ./Launch.sh \
|
||||
&& tee -a Launch.sh <<< '#!/bin/bash' \
|
||||
&& tee -a Launch.sh <<< 'set -eux' \
|
||||
&& tee -a Launch.sh <<< 'sudo chown $(id -u):$(id -g) /dev/kvm 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 <<< '[[ "${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 <<< '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 <<< '-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 <<< '-smp ${CPU_STRING:-${SMP:-4},cores=${CORES:-4}} \' \
|
||||
&& tee -a Launch.sh <<< '-usb -device usb-kbd -device usb-tablet \' \
|
||||
&& 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/OSX-KVM/OVMF_CODE.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 <<< '-audiodev ${AUDIO_DRIVER:-alsa},id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda \' \
|
||||
&& tee -a Launch.sh <<< '-device ich9-ahci,id=sata \' \
|
||||
&& tee -a Launch.sh <<< '-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=${BOOTDISK:-/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2} \' \
|
||||
&& tee -a Launch.sh <<< '-device ide-hd,bus=sata.2,drive=OpenCoreBoot \' \
|
||||
&& tee -a Launch.sh <<< '-device ide-hd,bus=sata.3,drive=InstallMedia \' \
|
||||
&& tee -a Launch.sh <<< '-drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=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 <<< '-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 <<< '-monitor stdio \' \
|
||||
&& tee -a Launch.sh <<< '-boot menu=on \' \
|
||||
&& tee -a Launch.sh <<< '-vga vmware \' \
|
||||
&& tee -a Launch.sh <<< '${EXTRA:-}'
|
||||
|
||||
# docker exec containerid mv ./Launch-nopicker.sh ./Launch.sh
|
||||
# This is now a legacy command.
|
||||
# You can use -e BOOTDISK=/bootdisk with -v ./bootdisk.img:/bootdisk
|
||||
RUN grep -v InstallMedia ./Launch.sh > ./Launch-nopicker.sh \
|
||||
&& chmod +x ./Launch-nopicker.sh \
|
||||
&& sed -i -e s/OpenCore\.qcow2/OpenCore\-nopicker\.qcow2/ ./Launch-nopicker.sh
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
####
|
||||
|
||||
# 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
|
||||
|
||||
# env -e ADDITIONAL_PORTS with a comma
|
||||
# for example, -e ADDITIONAL_PORTS=hostfwd=tcp::23-:23,
|
||||
ENV ADDITIONAL_PORTS=
|
||||
|
||||
# add additional QEMU boot arguments
|
||||
ENV BOOT_ARGS=
|
||||
|
||||
ENV BOOTDISK=
|
||||
|
||||
# edit the CPU that is being emulated
|
||||
ENV CPU=Penryn
|
||||
ENV CPUID_FLAGS='vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check,'
|
||||
|
||||
ENV DISPLAY=:0.0
|
||||
|
||||
# Deprecated
|
||||
ENV ENV=/env
|
||||
|
||||
# Boolean for generating a bootdisk with new random serials.
|
||||
ENV GENERATE_UNIQUE=false
|
||||
|
||||
# Boolean for generating a bootdisk with specific serials.
|
||||
ENV GENERATE_SPECIFIC=false
|
||||
|
||||
ENV IMAGE_PATH=/home/arch/OSX-KVM/mac_hdd_ng.img
|
||||
ENV IMAGE_FORMAT=qcow2
|
||||
|
||||
ENV KVM='accel=kvm:tcg'
|
||||
|
||||
ENV MASTER_PLIST_URL="https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist"
|
||||
|
||||
# ENV NETWORKING=e1000-82545em
|
||||
ENV NETWORKING=vmxnet3
|
||||
|
||||
# boolean for skipping the disk selection menu at in the boot process
|
||||
ENV NOPICKER=false
|
||||
|
||||
# dynamic RAM options for runtime
|
||||
ENV RAM=3
|
||||
# ENV RAM=max
|
||||
# ENV RAM=half
|
||||
|
||||
# The x and y coordinates for resolution.
|
||||
# Must be used with either -e GENERATE_UNIQUE=true or -e GENERATE_SPECIFIC=true.
|
||||
ENV WIDTH=1920
|
||||
ENV HEIGHT=1080
|
||||
|
||||
# libguestfs verbose
|
||||
ENV LIBGUESTFS_DEBUG=1
|
||||
ENV LIBGUESTFS_TRACE=1
|
||||
|
||||
VOLUME ["/tmp/.X11-unix"]
|
||||
|
||||
# check if /image is a disk image or a directory. This allows you to optionally use -v disk.img:/image
|
||||
# NOPICKER is used to skip the disk selection screen
|
||||
# GENERATE_UNIQUE is used to generate serial numbers on boot.
|
||||
# /env is a file that you can generate and save using -v source.sh:/env
|
||||
# the env file is a file that you can carry to the next container which will supply the serials numbers.
|
||||
# GENERATE_SPECIFIC is used to either accept the env serial numbers OR you can supply using:
|
||||
# -e DEVICE_MODEL="iMacPro1,1" \
|
||||
# -e SERIAL="C02TW0WAHX87" \
|
||||
# -e BOARD_SERIAL="C027251024NJG36UE" \
|
||||
# -e UUID="5CCB366D-9118-4C61-A00A-E5BAF3BED451" \
|
||||
# -e MAC_ADDRESS="A8:5C:2C:9A:46:2F" \
|
||||
|
||||
# the output will be /bootdisk.
|
||||
# /bootdisk is a useful persistent place to store the 15Mb serial number bootdisk.
|
||||
|
||||
# if you don't set any of the above:
|
||||
# the default serial numbers are already contained in ./OpenCore/OpenCore.qcow2
|
||||
# And the default serial numbers
|
||||
|
||||
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 \
|
||||
; [[ "${NOPICKER}" == true ]] && { \
|
||||
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
||||
&& export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2}" \
|
||||
; } \
|
||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
||||
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
||||
--master-plist-url="${MASTER_PLIST_URL}" \
|
||||
--count 1 \
|
||||
--tsv ./serial.tsv \
|
||||
--bootdisks \
|
||||
--width "${WIDTH:-1920}" \
|
||||
--height "${HEIGHT:-1080}" \
|
||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||
--output-env "${ENV:=/env}" \
|
||||
|| exit 1 ; } \
|
||||
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
||||
source "${ENV:=/env}" 2>/dev/null \
|
||||
; ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
|
||||
--master-plist-url="${MASTER_PLIST_URL}" \
|
||||
--model "${DEVICE_MODEL}" \
|
||||
--serial "${SERIAL}" \
|
||||
--board-serial "${BOARD_SERIAL}" \
|
||||
--uuid "${UUID}" \
|
||||
--mac-address "${MAC_ADDRESS}" \
|
||||
--width "${WIDTH:-1920}" \
|
||||
--height "${HEIGHT:-1080}" \
|
||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||
|| exit 1 ; } \
|
||||
; ./enable-ssh.sh && /bin/bash -c ./Launch.sh
|
||||
|
||||
# virt-manager mode: eta son
|
||||
# CMD virsh define <(envsubst < Docker-OSX.xml) && virt-manager || virt-manager
|
||||
# CMD virsh define <(envsubst < macOS-libvirt-Catalina.xml) && virt-manager || virt-manager
|
@ -42,21 +42,37 @@ RUN rm -f /home/arch/OSX-KVM/mac_hdd_ng.img
|
||||
|
||||
# OPTIONAL: Arch Linux server mirrors for super fast builds
|
||||
# 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 MIRROR_COUNTRY=US
|
||||
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" \
|
||||
| sed -e 's/^#Server/Server/' -e '/^#/d' \
|
||||
| head -n "$((${MIRROR_COUNT:-10}+1))" \
|
||||
| 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
|
||||
|
||||
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.
|
||||
ARG SCROT
|
||||
|
||||
@ -81,28 +97,6 @@ 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
|
||||
|
||||
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/OSX-KVM
|
||||
|
||||
RUN mkdir -p ~/.ssh \
|
||||
@ -172,7 +166,20 @@ ENV HEIGHT=1080
|
||||
ENV LIBGUESTFS_DEBUG=1
|
||||
ENV LIBGUESTFS_TRACE=1
|
||||
|
||||
CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
||||
# DMCA compliant download process
|
||||
# If BaseSystem.img does not exist, download ${SHORTNAME}
|
||||
|
||||
# shortname default is catalina, which means :latest is catalina
|
||||
ENV SHORTNAME=sonoma
|
||||
|
||||
ENV BASESYSTEM_IMAGE=BaseSystem.img
|
||||
|
||||
CMD ! [[ -e "${BASESYSTEM_IMAGE:-BaseSystem.img}" ]] \
|
||||
&& printf '%s\n' "No BaseSystem.img available, downloading ${SHORTNAME}" \
|
||||
&& make \
|
||||
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c ${BASESYSTEM_IMAGE:-BaseSystem.img} \
|
||||
&& rm ./BaseSystem.dmg \
|
||||
; 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 \
|
||||
; { [[ "${DISPLAY}" = ':99' ]] || [[ "${HEADLESS}" == true ]] ; } && { \
|
||||
nohup Xvfb :99 -screen 0 1920x1080x16 \
|
||||
|
@ -31,23 +31,36 @@ ARG SCROT
|
||||
|
||||
# OPTIONAL: Arch Linux server mirrors for super fast builds
|
||||
# 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 MIRROR_COUNTRY=US
|
||||
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 \
|
||||
{ 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" \
|
||||
| sed -e 's/^#Server/Server/' -e '/^#/d' \
|
||||
| head -n "$((${MIRROR_COUNT:-10}+1))" \
|
||||
| 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
|
||||
; 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.
|
||||
ARG SCROT
|
||||
@ -76,33 +89,6 @@ 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-*
|
||||
|
||||
####
|
||||
|
||||
|
||||
WORKDIR /home/arch/OSX-KVM
|
||||
|
||||
RUN mkdir -p ~/.ssh \
|
||||
@ -197,7 +183,20 @@ ENV TERMS_OF_USE=i_agree
|
||||
|
||||
ENV BOILERPLATE="By using this Dockerfile, you hereby agree that you are a security reseacher or developer and agree to use this Dockerfile to make the world a safer place. Examples include: making your apps safer, finding your mobile phone, compiling security products, etc. You understand that Docker-OSX is an Open Source project, which is released to the public under the GNU Pulic License version 3 and above. You acknowledge that the Open Source project is absolutely unaffiliated with any third party, in any form whatsoever. Any trademarks or intelectual property which happen to be mentioned anywhere in or around the project are owned by their respective owners. By using this Dockerfile, you agree to agree to the EULA of each piece of upstream or downstream software. The following code is released for the sole purpose of security research, under the GNU Public License version 3. If you are concerned about the licensing, please note that this project is not AGPL. A copy of the license is available online: https://github.com/sickcodes/Docker-OSX/blob/master/LICENSE. In order to use the following Dockerfile you must read and understand the terms. Once you have read the terms, use the -e TERMS_OF_USE=i_agree or -e TERMS_OF_USE=i_disagree"
|
||||
|
||||
CMD echo "${BOILERPLATE}" \
|
||||
# DMCA compliant download process
|
||||
# If BaseSystem.img does not exist, download ${SHORTNAME}
|
||||
|
||||
# shortname default is catalina, which means :latest is catalina
|
||||
ENV SHORTNAME=sonoma
|
||||
|
||||
ENV BASESYSTEM_IMAGE=BaseSystem.img
|
||||
|
||||
CMD ! [[ -e "${BASESYSTEM_IMAGE:-BaseSystem.img}" ]] \
|
||||
&& printf '%s\n' "No BaseSystem.img available, downloading ${SHORTNAME}" \
|
||||
&& make \
|
||||
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c ${BASESYSTEM_IMAGE:-BaseSystem.img} \
|
||||
&& rm ./BaseSystem.dmg \
|
||||
; echo "${BOILERPLATE}" \
|
||||
; [[ "${TERMS_OF_USE}" = i_agree ]] || exit 1 \
|
||||
; echo "Disk is being copied between layers... Please wait a minute..." \
|
||||
; sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
||||
|
178
FAQ.md
Normal file
178
FAQ.md
Normal file
@ -0,0 +1,178 @@
|
||||
# Frequently Asked Questions
|
||||
|
||||
These questions come up regularly, so here are the answers.
|
||||
|
||||
## Basics
|
||||
|
||||
### Is this legal?
|
||||
|
||||
The [macOS software license](https://www.apple.com/legal/sla/) allows running (some versions of) macOS in a virtual machine only on Apple hardware. The [Apple Security Bounty terms and conditions](https://security.apple.com/terms-and-conditions/) make an exception to that (and essentially anything in the macOS software license) under some specific circumstances.
|
||||
|
||||
Therefore, yes, there is a legal use for Docker-OSX. If your use doesn't fall under the license or the security bounty terms, then you are/will be violating the macOS software license. **Note that this is not provided as legal advice, and you should consult with your own counsel for legal guidance.**
|
||||
|
||||
You may also be interested in this [deeper dive into the subject](https://sick.codes/is-hackintosh-osx-kvm-or-docker-osx-legal/).
|
||||
|
||||
### What does Docker-OSX do?
|
||||
|
||||
Docker-OSX is an approach to setting up and launching a macOS virtual machine (VM) under [docker](https://en.wikipedia.org/wiki/Docker_(software)). The [Dockerfile](Dockerfile) is essentially a docker image building script that:
|
||||
1. validates a few things about the environment
|
||||
2. installs VM software (qemu) and creates a virtual disk within the docker container
|
||||
3. generates a serial number and firmware to make the VM look (enough) like Mac hardware
|
||||
4. downloads a macOS installer disk image
|
||||
5. generates a shell script to start the VM
|
||||
|
||||
The default configuration is intended to create an ephemeral but repeatably bootable macOS that can be probed for security research.
|
||||
|
||||
### Why docker?
|
||||
|
||||
Docker provides a straightforward way to package a flexible turnkey solution to setting up a macOS VM. It is not the only way to do so, nor is it necessarily the best approach to setting up a long-lived, persistent macOS VM. You may prefer to study the [Dockerfile](Dockerfile) and/or [OSX-KVM](https://github.com/kholia/OSX-KVM) to prepare a VM to run under [proxmox](https://en.wikipedia.org/wiki/Proxmox_Virtual_Environment) or [libvirt](https://en.wikipedia.org/wiki/Libvirt).
|
||||
|
||||
## Can I...
|
||||
|
||||
### ...run BlueBubbles/AirMessage/Beeper on it?
|
||||
|
||||
Yes. Make sure you [make serial numbers persist across reboots](README.md#making-serial-numbers-persist-across-reboots) after generating a unique serial number for yourself; don't use the default serial number. There is, of course, no guarantee that Apple won't block/disable your account, or inflict other consequences. See also the [legal considerations](#is-this-legal).
|
||||
|
||||
### ...develop iPhone apps on it?
|
||||
|
||||
Yes. You will probably find Xcode's UI frustratingly slow, but yes. Compiling apps (e.g. React Native) from the command line is likely to be less frustrating. There is, of course, no guarantee that Apple won't block/disable your account, remove you from the Apple Developer program, or inflict other consequences. See also the [legal considerations](#is-this-legal).
|
||||
|
||||
### ...connect my iPhone or other USB device to it?
|
||||
|
||||
Yes, at least if your host OS is Linux. See [instructions](README.md#vfio-iphone-usb-passthrough-vfio). It may or may not be possible if your host OS is Windows.
|
||||
|
||||
### ...run CI/CD processes with it?
|
||||
|
||||
Maybe, but there are several reasons not to:
|
||||
1. There are [legal considerations](#is-this-legal).
|
||||
2. Nested virtualization is generally unavailable on cloud-hosted CI/CD and therefore Docker-OSX doesn't run.
|
||||
3. You are almost always better off using your own macOS runners (on virtual or actual Mac hardware) rather than trying to make the square peg of Docker-OSX fit the round hole of macOS-specific CI/CD.
|
||||
|
||||
You absolutely can install runners on the macOS VM itself (which does not get around the legal considerations mentioned above), but [Docker-OSX may not be the best approach](#why-docker).
|
||||
|
||||
### ...run on Linux but with Wayland?
|
||||
|
||||
Yes, but your Wayland server must support X11 connections (or you can [use VNC instead](README.md#building-a-headless-container-that-allows-insecure-vnc-on-localhost-for-local-use-only)).
|
||||
|
||||
### ...run on Windows?
|
||||
|
||||
Yes, as long as you have a new enough version of Windows 11 and have WSL2 set up. See [this section of the README](README.md#id-like-to-run-docker-osx-on-windows) for details. No, it will not work under Windows 10. Not even if you have WSL2 set up.
|
||||
|
||||
### ...run on macOS?
|
||||
|
||||
If you have a Mac with Apple Silicon you are better served by [UTM](https://apps.apple.com/us/app/utm-virtual-machines/id1538878817?mt=12).
|
||||
|
||||
If you have an Intel Mac you can install and run docker (either [Docker Desktop](https://www.docker.com/products/docker-desktop/) or [colima](https://github.com/abiosoft/colima)). In either case, docker will be running under a Linux VM, which complicates things. You are likely to encounter one or more of the [common errors](#common-errors) below. Consider using qemu directly with HVF acceleration (e.g. with [libvirt](https://libvirt.org/macos.html)) instead.
|
||||
|
||||
### ...run on cloud services?
|
||||
|
||||
Cloud providers typically run their various services within virtual machines running on top of their actual hardware. These VMs typically are not set up to provide nested virtualization, which means KVM is unavailable so Docker-OSX will not work. This is _especially and specifically_ the case on CI/CD runners such as GitHub Actions, Azure DevOps Pipelines, CircleCI, GitLab CI/CD, etc. (however, see [running CI/CD](#run-cicd-processes-with-it)). Some cloud providers offer services that do allow virtualization, such as [Amazon's EC2 Bare Metal Instances](https://aws.amazon.com/about-aws/whats-new/2018/05/announcing-general-availability-of-amazon-ec2-bare-metal-instances/), but often at a significant premium.
|
||||
|
||||
In short, probably not.
|
||||
|
||||
## Common Errors
|
||||
|
||||
### Docker Errors
|
||||
|
||||
If you get an error like `docker: command not found` then you don't have docker installed and none of this works. Try [Docker Desktop](https://www.docker.com/products/docker-desktop/) on Windows or your distribution's normal package manager on Linux.
|
||||
|
||||
If you get an error like `docker: Got permission denied while trying to connect to the Docker daemon` or `docker: unknown server OS: .` the mostly likely explanation is that your user isn't in the `docker` Unix group. You'll need to add yourself to the `docker` group, log out, and log back in.
|
||||
|
||||
If you get an error like `Cannot connect to the Docker daemon at unix://var/run/docker.sock. Is the docker daemon running?` then `dockerd` isn't running. On most Linux distributions you should be able to start it with `sudo systemctl enable docker --now`.
|
||||
|
||||
### GTK Initialization Failed
|
||||
|
||||
This is an X11 error and means that the arguments to qemu are telling it to connect to an X11 display that it either can't connect to at all or doesn't have permission to connect to. In the latter case, this can usually be fixed by running `xhost +` on the host running the X11 server.
|
||||
|
||||
In many cases, however, it is preferable to tell qemu to listen for a VNC connection instead of trying to connect to X11; see [this section of the README](README.md#building-a-headless-container-that-allows-insecure-vnc-on-localhost-for-local-use-only) for instructions.
|
||||
|
||||
### KVM Error
|
||||
|
||||
If you get an error like `error gathering device information while adding custom device "/dev/kvm": no such file or directory` that means KVM is not available/working on the Linux kernel on which you are running docker. This could be because you are attempting to run somewhere that doesn't support nested virtualization (see [above](#can-i-run-this-on)), or because your BIOS does not have virtualization extensions turned on, or because your CPU is too old to support virtualization extensions, or your Linux kernel does not have KVM support loaded/enabled. Fixing KVM issues is well beyond the scope of this document, but you can [start here](https://www.linux-kvm.org/page/FAQ).
|
||||
|
||||
### ALSA Error
|
||||
|
||||
You might get an error like this:
|
||||
```
|
||||
(qemu) ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
|
||||
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
|
||||
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
|
||||
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
|
||||
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
|
||||
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
|
||||
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
|
||||
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
|
||||
alsa: Could not initialize DAC
|
||||
alsa: Failed to open `default':
|
||||
alsa: Reason: No such file or directory
|
||||
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
|
||||
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
|
||||
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
|
||||
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
|
||||
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
|
||||
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
|
||||
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
|
||||
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
|
||||
alsa: Could not initialize DAC
|
||||
alsa: Failed to open `default':
|
||||
alsa: Reason: No such file or directory
|
||||
audio: Failed to create voice `dac'
|
||||
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
|
||||
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
|
||||
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
|
||||
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
|
||||
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
|
||||
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
|
||||
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
|
||||
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
|
||||
alsa: Could not initialize ADC
|
||||
alsa: Failed to open `default':
|
||||
alsa: Reason: No such file or directory
|
||||
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
|
||||
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
|
||||
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
|
||||
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
|
||||
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
|
||||
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
|
||||
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
|
||||
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
|
||||
alsa: Could not initialize ADC
|
||||
alsa: Failed to open `default':
|
||||
alsa: Reason: No such file or directory
|
||||
audio: Failed to create voice `adc'
|
||||
```
|
||||
|
||||
Docker-OSX defaults to telling qemu to use ALSA for audio output. Your host system may be using PulseAudio instead (see [PulseAudio](README.md#pulseaudio)), but you may not need audio output at all. You can pass `-e AUDIO_DRIVER="id=none,driver=none"` to disable audio output.
|
||||
|
||||
### No Disk to Install On
|
||||
|
||||
If you have launched the installer but don't see a disk to install macOS on, it probably means you skipped the step where you run Disk Utility to format the virtual disk. See the [README](README.md#additional-boot-instructions-for-when-you-are-creating-your-container).
|
||||
|
||||
### Slow Installation
|
||||
|
||||
This is not unique to virtual hardware. The macOS installation process gives apparently random and dependably incorrect time estimates, and can often appear to have completely frozen. Just be patient. It could take hours, maybe even more than a day.
|
||||
|
||||
### Installer After Completing Install
|
||||
|
||||
If you wind up in the installer again after you've installed macOS it means you booted from the installer disk instead of the disk you installed macOS on. Reboot and make sure you choose the correct disk to boot.
|
||||
|
||||
## Next Steps
|
||||
|
||||
Congratulations, you got a macOS VM up and running! Now what?
|
||||
|
||||
### Slow UI
|
||||
|
||||
The macOS UI expects and relies on GPU acceleration, and there is (currently) no way to provide GPU acceleration in the virtual hardware. See [osx-optimizer](https://github.com/sickcodes/osx-optimizer) for macOS configuration to speed things up.
|
||||
|
||||
### Extract the Virtual Disk
|
||||
|
||||
With the container stopped, `sudo find /var/lib/docker -size +10G -name mac_hdd_ng.img` to find the disk image then copy it where you want it.
|
||||
|
||||
### Disk Space
|
||||
|
||||
Is your host machine's disk, specifically `/var` (because of `/var/lib/docker`), getting full? [Fix it](README.md#increase-disk-space-by-moving-varlibdocker-to-external-drive-block-storage-nfs-or-any-other-location-conceivable).
|
||||
|
||||
### Increase RAM or CPUs/cores
|
||||
|
||||
The `RAM`, `SMP`, and `CORES` options are all docker environment variables, which means it uses whatever you provide any time you start a container.
|
||||
|
141
README.md
141
README.md
@ -54,7 +54,9 @@ First time here? try [initial setup](#initial-setup), otherwise try the instruct
|
||||
## Any questions, ideas, or just want to hang out?
|
||||
# [https://discord.gg/sickchat](https://discord.gg/sickchat)
|
||||
|
||||
### Catalina [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||
Release names and their version:
|
||||
|
||||
### Catalina (10.15) [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||
|
||||
```bash
|
||||
docker run -it \
|
||||
@ -62,11 +64,12 @@ docker run -it \
|
||||
-p 50922:10022 \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
||||
-e SHORTNAME=catalina \
|
||||
sickcodes/docker-osx:latest
|
||||
|
||||
# docker build -t docker-osx .
|
||||
```
|
||||
### Big Sur [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||
### Big Sur (11) [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||
|
||||
```bash
|
||||
docker run -it \
|
||||
@ -74,12 +77,13 @@ docker run -it \
|
||||
-p 50922:10022 \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
||||
sickcodes/docker-osx:big-sur
|
||||
-e SHORTNAME=big-sur \
|
||||
sickcodes/docker-osx:latest
|
||||
|
||||
# docker build -t docker-osx --build-arg SHORTNAME=big-sur .
|
||||
# docker build -t docker-osx .
|
||||
```
|
||||
|
||||
### Monterey [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||
### Monterey (12) [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||
|
||||
```bash
|
||||
|
||||
@ -90,12 +94,13 @@ docker run -it \
|
||||
-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:monterey
|
||||
-e SHORTNAME=monterey \
|
||||
sickcodes/docker-osx:latest
|
||||
|
||||
# docker build -t docker-osx --build-arg SHORTNAME=monterey .
|
||||
# docker build -t docker-osx .
|
||||
```
|
||||
|
||||
### Ventura [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||
### Ventura (13) [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||
|
||||
```bash
|
||||
|
||||
@ -106,12 +111,51 @@ docker run -it \
|
||||
-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
|
||||
-e SHORTNAME=ventura \
|
||||
sickcodes/docker-osx:latest
|
||||
|
||||
# docker build -t docker-osx --build-arg SHORTNAME=ventura .
|
||||
# docker build -t docker-osx .
|
||||
```
|
||||
|
||||
#### Run Catalina Pre-Installed [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||
### Sonoma (14) [](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-custom-sonoma.plist' \
|
||||
-e SHORTNAME=sonoma \
|
||||
sickcodes/docker-osx:latest
|
||||
|
||||
# docker build -t docker-osx .
|
||||
```
|
||||
|
||||
### Sequoia (15) [](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-custom-sonoma.plist' \
|
||||
-e SHORTNAME=sequoia \
|
||||
sickcodes/docker-osx:latest
|
||||
|
||||
# docker build -t docker-osx .
|
||||
```
|
||||
|
||||
<!-- #### Run Catalina Pre-Installed [](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||
|
||||
```bash
|
||||
# 40GB disk space required: 20GB original image 20GB your container.
|
||||
@ -127,12 +171,12 @@ docker run -it \
|
||||
sickcodes/docker-osx:auto
|
||||
|
||||
# username is user
|
||||
# passsword is alpine
|
||||
```
|
||||
# password is alpine
|
||||
``` -->
|
||||
|
||||
### Older Systems
|
||||
|
||||
### 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
|
||||
|
||||
@ -141,12 +185,13 @@ docker run -it \
|
||||
-p 50922:10022 \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
||||
sickcodes/docker-osx:high-sierra
|
||||
-e SHORTNAME=high-sierra \
|
||||
sickcodes/docker-osx:latest
|
||||
|
||||
# docker build -t docker-osx --build-arg SHORTNAME=high-sierra .
|
||||
# docker build -t docker-osx .
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
@ -155,9 +200,10 @@ docker run -it \
|
||||
-p 50922:10022 \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
||||
sickcodes/docker-osx:mojave
|
||||
-e SHORTNAME=mojave \
|
||||
sickcodes/docker-osx:latest
|
||||
|
||||
# docker build -t docker-osx --build-arg SHORTNAME=mojave .
|
||||
# docker build -t docker-osx .
|
||||
```
|
||||
|
||||
|
||||
@ -180,11 +226,12 @@ docker run -it \
|
||||
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
||||
-e GENERATE_UNIQUE=true \
|
||||
-e MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/custom/config-nopicker-custom.plist \
|
||||
-e SHORTNAME=catalina \
|
||||
sickcodes/docker-osx:naked
|
||||
```
|
||||
|
||||
|
||||
#### Use your own image and manually and automatically log into a shell
|
||||
<!-- #### Use your own image and manually and automatically log into a shell
|
||||
|
||||
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||
|
||||
@ -202,15 +249,16 @@ wget https://images.sick.codes/mac_hdd_ng_auto_monterey.img
|
||||
docker run -it \
|
||||
--device /dev/kvm \
|
||||
-p 50922:10022 \
|
||||
-v "${PWD}/mac_hdd_ng_auto_monterey:/image" \
|
||||
-v "${PWD}/mac_hdd_ng_auto_monterey.img:/image" \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||
-e "DISPLAY=${DISPLAY:-:0.0}" \
|
||||
-e "USERNAME=user" \
|
||||
-e "PASSWORD=alpine" \
|
||||
-e GENERATE_UNIQUE=true \
|
||||
-e MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/custom/config-nopicker-custom.plist \
|
||||
-e SHORTNAME=monterey \
|
||||
sickcodes/docker-osx:naked-auto
|
||||
```
|
||||
``` -->
|
||||
|
||||
# Share directories, sharing files, shared folder, mount folder
|
||||
The easiest and most secure way is `sshfs`
|
||||
@ -227,7 +275,7 @@ sshfs user@localhost:/ -p 50922 ~/mnt/osx
|
||||
|
||||
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
|
||||
|
||||
@ -373,19 +421,21 @@ Pick one of these while **building**, irrelevant when using docker pull:
|
||||
--build-arg SHORTNAME=big-sur
|
||||
--build-arg SHORTNAME=monterey
|
||||
--build-arg SHORTNAME=ventura
|
||||
--build-arg SHORTNAME=sonoma
|
||||
```
|
||||
|
||||
|
||||
## 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
|
||||
- Mojave
|
||||
- Catalina
|
||||
- Big Sur
|
||||
- Monterey
|
||||
- Ventura
|
||||
- High Sierra (10.13)
|
||||
- Mojave (10.14)
|
||||
- Catalina (10.15)
|
||||
- Big Sur (11)
|
||||
- Monterey (12)
|
||||
- Ventura (13)
|
||||
- Sonoma (14)
|
||||
- Auto (pre-made Catalina)
|
||||
- Naked (use your own .img)
|
||||
- Naked-Auto (user your own .img and SSH in)
|
||||
@ -410,6 +460,14 @@ Monterey make your own image:
|
||||
|
||||
[](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`
|
||||
|
||||
[](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
|
||||
@ -490,7 +548,7 @@ In case you're interested, contact [@sickcodes on Twitter](https://twitter.com/s
|
||||
|
||||
## 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
|
||||
- [Run Android in a Docker Container with Dock Droid](https://github.com/sickcodes/dock-droid)
|
||||
@ -510,7 +568,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.
|
||||
|
||||
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 want to use Docker-OSX to develop/secure apps in Xcode (sign into Xcode, Transporter)](#quick-start-your-own-image-naked-container-image)
|
||||
@ -523,6 +581,7 @@ 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: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:mojave` - I want to run Mojave.
|
||||
@ -585,6 +644,8 @@ INFO: /dev/kvm exists
|
||||
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.
|
||||
|
||||
After installation, go into Settings and check these 2 boxes:
|
||||
@ -616,7 +677,7 @@ Or try:
|
||||
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)
|
||||
- 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)
|
||||
|
||||
@ -685,7 +746,7 @@ Examples:
|
||||
|
||||
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 the Docker group, KVM group, libvirt group
|
||||
### Confirm your user is part of the Docker group, KVM group, libvirt group
|
||||
|
||||
#### Add yourself to the Docker group
|
||||
|
||||
@ -1037,7 +1098,7 @@ IP_ADDRESS=172.17.0.1
|
||||
|
||||
### 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
|
||||
# Set the docker0 bridge to the trusted zone
|
||||
@ -1399,7 +1460,7 @@ docker run -it \
|
||||
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 \
|
||||
@ -1577,7 +1638,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.
|
||||
|
||||
- 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.
|
||||
|
||||
@ -1688,7 +1749,7 @@ docker run -it \
|
||||
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**
|
||||
|
||||
@ -1733,7 +1794,7 @@ You also need the container IP: `docker inspect <containerid> | jq -r '.[0].Netw
|
||||
|
||||
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.
|
||||
|
||||
@ -1785,7 +1846,7 @@ docker run -it \
|
||||
sickcodes/docker-osx:auto
|
||||
|
||||
# username is user
|
||||
# passsword is alpine
|
||||
# password is alpine
|
||||
# Wait 2-3 minutes until you drop into the shell.
|
||||
```
|
||||
|
||||
|
Submodule osx-serial-generator updated: a9e2b126db...908b3d687a
@ -17,6 +17,7 @@
|
||||
# scrot -o big-sur_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
|
||||
# REMOTE_SERVER=
|
||||
# scp root@"${REMOTE_SERVER}":~/*_master.png .
|
||||
@ -30,6 +31,7 @@ TESTS=(
|
||||
big-sur
|
||||
monterey
|
||||
ventura
|
||||
sonoma
|
||||
)
|
||||
|
||||
# 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 |
@ -138,6 +138,7 @@ VERSION_BUILDS=(
|
||||
'big-sur'
|
||||
'monterey'
|
||||
'ventura'
|
||||
'sonoma'
|
||||
)
|
||||
|
||||
warning () {
|
||||
@ -159,6 +160,7 @@ install_docker () {
|
||||
; 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 - \
|
||||
&& 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" \
|
||||
&& apt update -y \
|
||||
&& apt install docker-ce docker-ce-cli containerd.io -y \
|
||||
@ -307,13 +309,15 @@ yes | apt install -y --no-install-recommends tzdata -y
|
||||
install_scrotcat
|
||||
yes | install_vnc
|
||||
export_display_99
|
||||
apt install xvfb -y
|
||||
start_xvfb
|
||||
# start_vnc
|
||||
enable_kvm
|
||||
reset_docker_hard
|
||||
echo killall Xvfb
|
||||
# echo killall Xvfb
|
||||
clone_repo "${BRANCH}" "${REPO}"
|
||||
cd ./Docker-OSX
|
||||
git pull
|
||||
|
||||
for SHORTNAME in "${VERSION_BUILDS[@]}"; do
|
||||
docker-osx:version "${SHORTNAME}"
|
||||
@ -334,6 +338,10 @@ if [[ "${DOCKER_USERNAME}" ]] && [[ "${DOCKER_PASSWORD}" ]]; then
|
||||
docker push "sickcodes/docker-osx:${SHORTNAME}"
|
||||
done \
|
||||
&& touch PUSHED
|
||||
docker push sickcodes/docker-osx:naked
|
||||
docker push sickcodes/docker-osx:auto
|
||||
docker push sickcodes/docker-osx:naked-auto
|
||||
|
||||
fi
|
||||
|
||||
# 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,6 +93,9 @@ 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' \
|
||||
&& 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
|
||||
|
||||
RUN yes | sudo pacman -Syyuu --noconfirm \
|
||||
@ -122,4 +125,17 @@ RUN printf '\n\n\n\n%s\n%s\n\n\n\n' '===========VNC_PASSWORD========== ' "$(<vnc
|
||||
|
||||
WORKDIR /home/arch/OSX-KVM
|
||||
|
||||
CMD ./enable-ssh.sh && envsubst < ./Launch_custom.sh | bash
|
||||
# DMCA compliant download process
|
||||
# If BaseSystem.img does not exist, download ${SHORTNAME}
|
||||
|
||||
# shortname default is catalina, which means :latest is catalina
|
||||
ENV SHORTNAME=sonoma
|
||||
|
||||
ENV BASESYSTEM_IMAGE=BaseSystem.img
|
||||
|
||||
CMD ! [[ -e "${BASESYSTEM_IMAGE:-BaseSystem.img}" ]] \
|
||||
&& printf '%s\n' "No BaseSystem.img available, downloading ${SHORTNAME}" \
|
||||
&& make \
|
||||
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c ${BASESYSTEM_IMAGE:-BaseSystem.img} \
|
||||
&& rm ./BaseSystem.dmg \
|
||||
; ./enable-ssh.sh && envsubst < ./Launch_custom.sh | bash
|
||||
|
@ -203,5 +203,18 @@ RUN vncpasswd -f < vncpasswd_file > ${HOME}/.vnc/passwd
|
||||
RUN chmod 600 ~/.vnc/passwd
|
||||
RUN printf '\n\n\n\n%s\n%s\n\n\n\n' '===========VNC_PASSWORD========== ' "$(<vncpasswd_file)"
|
||||
|
||||
CMD ./enable-ssh.sh && envsubst < ./Launch_custom.sh | bash
|
||||
# DMCA compliant download process
|
||||
# If BaseSystem.img does not exist, download ${SHORTNAME}
|
||||
|
||||
# shortname default is catalina, which means :latest is catalina
|
||||
ENV SHORTNAME=sonoma
|
||||
|
||||
ENV BASESYSTEM_IMAGE=BaseSystem.img
|
||||
|
||||
CMD ! [[ -e "${BASESYSTEM_IMAGE:-BaseSystem.img}" ]] \
|
||||
&& printf '%s\n' "No BaseSystem.img available, downloading ${SHORTNAME}" \
|
||||
&& make \
|
||||
&& qemu-img convert BaseSystem.dmg -O qcow2 -p -c ${BASESYSTEM_IMAGE:-BaseSystem.img} \
|
||||
&& rm ./BaseSystem.dmg \
|
||||
; ./enable-ssh.sh && envsubst < ./Launch_custom.sh | bash
|
||||
|
||||
|
Reference in New Issue
Block a user