Skip to content

Commit

Permalink
Merge pull request #758 from sickcodes/sonoma
Browse files Browse the repository at this point in the history
Update to add Sonoma
  • Loading branch information
sickcodes committed Apr 8, 2024
2 parents 846cf8f + 37aad04 commit 756a1c0
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 6 deletions.
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
#
Expand Down Expand Up @@ -58,10 +59,12 @@ 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\ =\ 30/g /etc/pacman.conf
RUN perl -i -p -e s/^\#Color/Color$'\n'ParallelDownloads\ =\ ${PARALLEL_DOWNLOADS:=30}/g /etc/pacman.conf

ARG RANKMIRRORS
ARG MIRROR_COUNTRY=US
ARG MIRROR_COUNT=10
Expand Down Expand Up @@ -125,7 +128,7 @@ RUN tee -a sshd_config <<< 'AllowTcpForwarding yes' \

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/OSX-KVM

# enable ssh
Expand All @@ -151,11 +154,12 @@ 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
# shortname default is catalina, which means :latest is catalina
ARG SHORTNAME=catalina
RUN make \
Expand All @@ -172,6 +176,7 @@ RUN sudo tee -a /etc/pacman.conf <<< "SigLevel = ${SIGLEVEL}" \
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 linux-headers archlinux-keyring guestfs-tools mkinitcpio pcre pcre2 --noconfirm \
&& libguestfs-test-tool \
Expand All @@ -182,7 +187,7 @@ RUN if [[ "${LINUX}" == true ]]; then \
# 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:=master}" "${REPO:=https://github.com/sickcodes/Docker-OSX.git}"
RUN touch Launch.sh \
&& chmod +x ./Launch.sh \
Expand All @@ -197,7 +202,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 \' \
Expand Down
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,24 @@ docker run -it \
# docker build -t docker-osx --build-arg SHORTNAME=ventura .
```

### Sonoma [![https://img.shields.io/docker/image-size/sickcodes/docker-osx/sonoma?label=sickcodes%2Fdocker-osx%3Asonoma](https://img.shields.io/docker/image-size/sickcodes/docker-osx/sonoma?label=sickcodes%2Fdocker-osx%3Asonoma)](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://img.shields.io/docker/image-size/sickcodes/docker-osx/auto?label=sickcodes%2Fdocker-osx%3Aauto](https://img.shields.io/docker/image-size/sickcodes/docker-osx/auto?label=sickcodes%2Fdocker-osx%3Aauto)](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)

```bash
Expand Down Expand Up @@ -373,6 +391,7 @@ 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
```


Expand All @@ -386,6 +405,7 @@ There are currently multiple images, each with different use cases (explained [b
- Big Sur
- Monterey
- Ventura
- Sonoma
- Auto (pre-made Catalina)
- Naked (use your own .img)
- Naked-Auto (user your own .img and SSH in)
Expand All @@ -410,6 +430,14 @@ Monterey make your own image:

[![https://img.shields.io/docker/image-size/sickcodes/docker-osx/monterey?label=sickcodes%2Fdocker-osx%3Amonterey](https://img.shields.io/docker/image-size/sickcodes/docker-osx/monterey?label=sickcodes%2Fdocker-osx%3Amonterey)](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)

Ventura make your own image:

[![https://img.shields.io/docker/image-size/sickcodes/docker-osx/ventura?label=sickcodes%2Fdocker-osx%3Aventura](https://img.shields.io/docker/image-size/sickcodes/docker-osx/ventura?label=sickcodes%2Fdocker-osx%3Aventura)](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)

Sonoma make your own image:

[![https://img.shields.io/docker/image-size/sickcodes/docker-osx/sonoma?label=sickcodes%2Fdocker-osx%3Asonoma](https://img.shields.io/docker/image-size/sickcodes/docker-osx/sonoma?label=sickcodes%2Fdocker-osx%3Asonoma)](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://img.shields.io/docker/image-size/sickcodes/docker-osx/auto?label=sickcodes%2Fdocker-osx%3Aauto](https://img.shields.io/docker/image-size/sickcodes/docker-osx/auto?label=sickcodes%2Fdocker-osx%3Aauto)](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated)
Expand Down Expand Up @@ -523,6 +551,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.
Expand Down
2 changes: 2 additions & 0 deletions tests/boot-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand All @@ -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.
Expand Down
Binary file added tests/sonoma_master.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ VERSION_BUILDS=(
'big-sur'
'monterey'
'ventura'
'sonoma'
)

warning () {
Expand Down

0 comments on commit 756a1c0

Please sign in to comment.