HUB
Sign inSign up

khulnasoft/docker-osx

By khulnasoft

•Updated almost 2 years ago

Image
0

1.2K

khulnasoft/docker-osx repository overview

⁠🏎️ macOS Docker 🏎️

Label

OSX (docker-OSX) inside a Docker container.

⁠Features ✨

  • KVM acceleration 🏎️
  • Web-based viewer 🖥️
  • Automatic download ⏬

⁠Usage 🐳

Via Docker Compose:

services:
  docker-osx:
    image: khulnasoft/docker-osx
    container_name: docker-osx
    environment:
      VERSION: "13"
    devices:
      - /dev/kvm
      - /dev/net/tun
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 5900:5900/tcp
      - 5900:5900/udp
    restart: always
    stop_grace_period: 2m

Via Docker CLI:

docker run -it --rm -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN --stop-timeout 120 khulnasoft/docker-osx

Via Kubernetes:

kubectl apply -f https://raw.githubusercontent.com/khulnasoft/docker-osx/refs/heads/master/kubernetes.yml

⁠Compatibility ⚙️

ProductPlatform
Docker EngineLinux✅
Docker DesktopLinux❌
Docker Desktopdocker-OSX❌
Docker DesktopWindows 11✅
Docker DesktopWindows 10❌

⁠FAQ 💬

⁠How do I use it?

Very simple! These are the steps:

  • Start the container and connect to port 8006⁠ using your web browser.

  • Choose Disk Utility and then select the largest Apple Inc. VirtIO Block Media disk.

  • Click the Erase button to format the disk to APFS, and give it any recognizable name you like.

  • Close the current window and proceed the installation by clicking Reinstall docker-OSX.

  • When prompted where you want to install it, select the disk you just created previously.

  • After all files are copied, select your region, language, and account settings.

Enjoy your brand new machine, and don't forget to star this repo! ⭐

⁠How do I select the docker-OSX version?

By default, docker-OSX 13 (Ventura) will be installed, as it offers the best performance.

But you can add the VERSION environment variable to your compose file, in order to specify an alternative docker-OSX version to be downloaded:

environment:
  VERSION: "13"

Select from the values below:

ValueVersionName
15docker-OSX 15Sequoia
14docker-OSX 14Sonoma
13docker-OSX 13Ventura
12docker-OSX 12Monterey
11docker-OSX 11Big Sur
⁠How do I change the storage location?

To change the storage location, include the following bind mount in your compose file:

volumes:
  - /var/osx:/storage

Replace the example path /var/osx with the desired storage folder.

⁠How do I change the size of the disk?

To expand the default size of 64 GB, add the DISK_SIZE setting to your compose file and set it to your preferred capacity:

environment:
  DISK_SIZE: "256G"

Tip

This can also be used to resize the existing disk to a larger capacity without any data loss.
⁠How do I change the amount of CPU or RAM?

By default, the container will be allowed to use a maximum of 2 CPU cores and 4 GB of RAM.

If you want to adjust this, you can specify the desired amount using the following environment variables:

environment:
  RAM_SIZE: "8G"
  CPU_CORES: "4"
⁠How do I pass-through a USB device?

To pass-through a USB device, first lookup its vendor and product id via the lsusb command, then add them to your compose file like this:

environment:
  ARGUMENTS: "-device usb-host,vendorid=0x1234,productid=0x1234"
devices:
  - /dev/bus/usb
⁠How do I verify if my system supports KVM?

Only Linux and Windows 11 support KVM virtualization, docker-OSX and Windows 10 do not unfortunately.

You can run the following commands in Linux to check your system:

sudo apt install cpu-checker
sudo kvm-ok

If you receive an error from kvm-ok indicating that KVM cannot be used, please check whether:

  • the virtualization extensions (Intel VT-x or AMD SVM) are enabled in your BIOS.

  • you enabled "nested virtualization" if you are running the container inside a virtual machine.

  • you are not using a cloud provider, as most of them do not allow nested virtualization for their VPS's.

If you do not receive any error from kvm-ok but the container still complains about KVM, please check whether:

  • you are not using "Docker Desktop for Linux" as it does not support KVM, instead make use of Docker Engine directly.

  • it could help to add privileged: true to your compose file (or sudo to your docker run command), to rule out any permission issue.

⁠Disclaimer ⚖️

Only run this container on Apple hardware, any other use is not permitted by their EULA. The product names, logos, brands, and other trademarks referred to within this project are the property of their respective trademark holders. This project is not affiliated, sponsored, or endorsed by Apple Inc.

Tag summary
Recent tags
Content type
Image
Digest
sha256:6a859d1a2…
Size
106.6 MB
Last updated
almost 2 years ago
docker pull khulnasoft/docker-osx:latest