Originally created by @kurbar on GitHub (Sep 23, 2024).
Doing this all on an Ubuntu 24.04 server.
Steps
Cloned this repo
Built a base Sonoma image - docker build -t docker-osx:sonoma --build-arg SHORTNAME=sonoma --build-arg SIZE=30G .
Build a VNC image from the created base image - docker build -t docker-osx:sonoma-vnc -f vnc-version/Dockerfile --build-arg SHORTNAME=sonoma --build-arg SIZE=30G --build-arg BASE_IMAGE=docker-osx:sonoma .
started a container from said image - docker run -d -it --name osx-sonoma --device /dev/kvm --device /dev/snd -p 8888:5999 -p 50922:10022 --privileged docker-osx:sonoma-vnc
Opened an SSH tunnel from local computer to proxy VNC port
Successfully accessed Sonoma from VNC
Created new APFS partition of larger QEMU disk
Reinstalled Sonoma via Recovery
Tried to boot from newly created and installed partition
Did the same steps with Ventura and that installation worked.
Originally created by @kurbar on GitHub (Sep 23, 2024).
Doing this all on an Ubuntu 24.04 server.
## Steps
1. Cloned this repo
2. Built a base Sonoma image - `docker build -t docker-osx:sonoma --build-arg SHORTNAME=sonoma --build-arg SIZE=30G .`
3. Build a VNC image from the created base image - `docker build -t docker-osx:sonoma-vnc -f vnc-version/Dockerfile --build-arg SHORTNAME=sonoma --build-arg SIZE=30G --build-arg BASE_IMAGE=docker-osx:sonoma .`
4. started a container from said image - `docker run -d -it --name osx-sonoma --device /dev/kvm --device /dev/snd -p 8888:5999 -p 50922:10022 --privileged docker-osx:sonoma-vnc`
5. Opened an SSH tunnel from local computer to proxy VNC port
6. Successfully accessed Sonoma from VNC
7. Created new APFS partition of larger QEMU disk
8. Reinstalled Sonoma via Recovery
9. Tried to boot from newly created and installed partition

Did the same steps with Ventura and that installation worked.
After installing Sonoma via recovery it booted up and seems to work properly.
@kurbar commented on GitHub (Oct 2, 2024):
I think I got Sonoma working now by using the following run command:
```
docker run -d -it --name osx-sonoma --device /dev/kvm --device /dev/snd -p 8888:5999 -p 50922:10022 -e CPU='Haswell-noTSX' -e CPUID_FLAGS='kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on' -e RAM=4 --privileged docker-osx:sonoma-vnc
```
After installing Sonoma via recovery it booted up and seems to work properly.
After installing Sonoma via recovery it booted up and seems to work properly.
How do you access vnc?
What's the pass i followed exactly as you do but unable to login maybe due to pass.
I tried complete install acc to official ended up with untitled disk and on same screen.
@wahaj4311 commented on GitHub (Nov 14, 2024):
> I think I got Sonoma working now by using the following run command:
>
> ```
> docker run -d -it --name osx-sonoma --device /dev/kvm --device /dev/snd -p 8888:5999 -p 50922:10022 -e CPU='Haswell-noTSX' -e CPUID_FLAGS='kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on' -e RAM=4 --privileged docker-osx:sonoma-vnc
> ```
>
> After installing Sonoma via recovery it booted up and seems to work properly.
How do you access vnc?
What's the pass i followed exactly as you do but unable to login maybe due to pass.
I tried complete install acc to official ended up with untitled disk and on same screen.
@binyamin555 commented on GitHub (Nov 30, 2024):
@wahaj4311
I was able to install both MacOS Ventura & MacOS Sonoma using these commands, and access them using VNC.
Do note that you'll need to change the external ports so that they will not collide (I'm using 5999 and 5998).
Not sure what port 50922 is for :/
## MacOS Ventura (13)
```sh
docker run -i \
--device /dev/kvm \
-p 50922:10022 \
-p 5999:5999 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e "DISPLAY=${DISPLAY:-:0.0}" \
-e "SHORTNAME=ventura" \
-e EXTRA="-display none -vnc 0.0.0.0:99,password=off" \
sickcodes/docker-osx:latest
```
## MacOS Sonoma (14)
```sh
docker run -it \
--device /dev/kvm \
-p 50922:10022 \
-p 5999:5999 \
-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" \
-e EXTRA="-display none -vnc 0.0.0.0:99,password=off" \
sickcodes/docker-osx:latest
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @kurbar on GitHub (Sep 23, 2024).
Doing this all on an Ubuntu 24.04 server.
Steps
docker build -t docker-osx:sonoma --build-arg SHORTNAME=sonoma --build-arg SIZE=30G .docker build -t docker-osx:sonoma-vnc -f vnc-version/Dockerfile --build-arg SHORTNAME=sonoma --build-arg SIZE=30G --build-arg BASE_IMAGE=docker-osx:sonoma .docker run -d -it --name osx-sonoma --device /dev/kvm --device /dev/snd -p 8888:5999 -p 50922:10022 --privileged docker-osx:sonoma-vncDid the same steps with Ventura and that installation worked.
@MendesCorporation commented on GitHub (Sep 27, 2024):
same here
@HyperfocusArtisan commented on GitHub (Sep 30, 2024):
Having the same problem. Ventura works just fine, but Sonoma keeps rebooting
@kurbar commented on GitHub (Oct 2, 2024):
I think I got Sonoma working now by using the following run command:
After installing Sonoma via recovery it booted up and seems to work properly.
@wahaj4311 commented on GitHub (Nov 14, 2024):
How do you access vnc?
What's the pass i followed exactly as you do but unable to login maybe due to pass.
I tried complete install acc to official ended up with untitled disk and on same screen.
@binyamin555 commented on GitHub (Nov 30, 2024):
@wahaj4311
I was able to install both MacOS Ventura & MacOS Sonoma using these commands, and access them using VNC.
Do note that you'll need to change the external ports so that they will not collide (I'm using 5999 and 5998).
Not sure what port 50922 is for :/
MacOS Ventura (13)
MacOS Sonoma (14)
@nreith commented on GitHub (Dec 13, 2024):
Out of curiosity, why vnc?
@binyamin555 commented on GitHub (Dec 16, 2024):
What are the alternatives?