2021-01-13 12:26:19 +08:00
# docker-osx
2021-02-13 02:11:48 +08:00
Available now on Artifact HUB
[![Artifact HUB ](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/docker-osx )](https://artifacthub.io/packages/search?repo=docker-osx)
2021-01-13 12:26:19 +08:00
## Information
This installs `docker-osx` in Kubernetes.
2021-01-13 12:49:25 +08:00
## Features
### What works
1) Setting cpu/memory options
1) Setting VNC password
1) Persistance
1) Setting SMBIOS
2021-01-15 14:13:07 +08:00
1) QEMU/virtio cpu/software gpu changes
2021-01-13 12:49:25 +08:00
1) Toggling Audio
1) Additional port forwarding
1) Kubernetes resource requests/limits
2021-01-15 14:13:07 +08:00
1) Defining version of macOS to install
2021-01-13 12:49:25 +08:00
1) Defining install partition size
1) Defining a different version of macOS
1) Additional QEMU parameters
1) GPU support
2021-01-22 11:48:05 +08:00
### What doesn't
1) Simultaneous VNC + GPU IOMMU (this is a limitation of QEMU :( unfortunately)
2021-01-13 12:26:19 +08:00
## Requirements
2021-01-22 11:48:05 +08:00
*) Install [host machine requirements ](#INSTALL-QEMU-AND-GPU-IOMMU.md )
2021-01-13 12:28:40 +08:00
*) Ensure you are running QEMU 5.X
2021-01-13 12:26:19 +08:00
*) Kubernetes
2021-01-15 14:13:07 +08:00
*) Helm v2
2021-01-13 12:26:19 +08:00
*) `sickcodes/docker-osx-vnc` Docker image
### Build `sickcodes/docker-osx-vnc`
1) Go back to the root directory
1) Build docker image
```
docker build \
-t sickcodes/docker-osx-vnc:latest \
2021-01-22 11:48:05 +08:00
-f helm/Dockerfile .
2021-01-13 12:26:19 +08:00
```
2021-01-22 11:48:05 +08:00
_Please ensure you are using the Dockerfile in the `helm` folder_
2021-01-15 13:56:20 +08:00
_Do not worry about passing `CPU` , `RAM` , etc as they are handled in `values.yaml` now._
### Installation
2021-01-22 11:48:05 +08:00
If planning on using a GPU with IOMMU passthrough it is recommended to configure it first and install macOS--otherwise installing may take a very long time depending on your hardware. Please see `qemu.systemInstaller.downloadDelay` , `qemu.systemInstaller.cache` , `qemu.systemDisk.downloadDelay` , and `qemu.systemDisk.cache` for possibly reducing installation time. It has taken me over three hours to install on some occasions with a NVMe secondary disk without GPU passthrough configured..
2021-01-15 13:56:20 +08:00
In `values.yaml` ..
1) Set a unique password for `vnc.password` .
2021-01-15 14:13:07 +08:00
1) Re-generate SMBIOS `configPlist.MLB` , `configPlist.SystemSerialNumber` , and `configPlist.SystemUUID` for iServices to work.
2021-01-15 13:56:20 +08:00
1) Update `serverName` to reflect the unique name (in the case more than one deployment is required).
2021-01-15 14:13:07 +08:00
1) Configure `qemu.systemInstaller.downloadDelay` (in a period of seconds) that reflects how long your internet connection will download
2021-01-15 13:56:20 +08:00
around 500MB (BaseSystem.dmg) + uncompress the file (which took about the same time for me to download on a 1gig internet connection).
1) Set `service.ip` to reflect an IP address of your choice, or use ingress.
1) Update `extraVolumes.hostPath.path` to something useful for you.
2021-01-22 11:48:05 +08:00
Optionally..
1) Install kexts to `kexts.path` and enable.
1) Adjust `openCore.boot.timeout` if desire for macOS to load automatically.
1) Add usb devices with `qemu.usb` or `qemu.extraArgs` if desired.
1) Add more ports for portforwarding services if needed.
2021-01-15 13:56:20 +08:00
Afterwards..
1) Launch your VNC viewer of choice and connect to the IP/hostname you defined + the port `8888` with the password specified
for `vnc.password` .
1) Install macOS like usual.
2021-01-15 14:13:07 +08:00
_Please note, after you have installed macOS feel free to set `qemu.systemInstaller.downloadDelay` to nothing, as BaseSystem.dmg will be stored in the path defined for `extraVolumes.hostPath.path` _
2021-01-15 13:56:20 +08:00
#### Resources
Please note, resource limits may vary based on hardware. The ones currently defined are ones that worked for me personally.