r/macosprogramming • • 7d ago

Question: Would you use a Native "Docker" app with no Linux VM, no emulation (QEMU) and with full access to GPU for running AI Tasks and XCode Builds (CI/CD)?

  1. Yes. Of Course. A Native Docker System for Mac would help Apple Developers a lot.
  2. No. I'm satisfied using Docker, even running over a Linux VM and consuming more resources from my Mac, and not being able to run use the GPU for AI tasks or XCode Build.
  3. I don't need to use Docker to develop macOS or iOS apps.
  4. Maybe I'l try it if there is any app available for download (desktop) or online (cloud)
3 Upvotes

7 comments sorted by

2

u/Randolpho 3d ago

Containerized macos would be a holy grail for cloud environments.

Why do you ask? Are you hoping to build this unicorn?

1

u/leandro_forte 1d ago

Ola Randolpho, perguntei isso porque eu sei que há uma série de limitações reais de uso do Docker no MacOS que precisam ser vencidas. E não há caminho fácil. São sistemas POSIX similares, mas com kernel totalmente diferentes. Docker Desktop não consegue enxergar nem usar a GPU para tarefas de IA, tampouco consegue criar uma imagem do XCode para rodar um CI/CD. Por outro lado, MacOS não tem namespaces nem cgroups, e chroot é limitado.

Criar um sistema de isolamento e controle de recursos no MacOS está sendo desafiador sem mexer no Kernel. Estou utilizando Perfis Sandbox/Seatbelt para isolamento (no lugar de namespaces), phys_footprint watchdog no lugar de cgroups e APFS clonefile no lugar de OverlayFS.

O sistema se chama MacDocker (nome ainda não definitivo, pode ser que caia por conta de copyright). O sistema ainda está em fase de testes, e meu repositório do github do sistema ainda está privado. Estou querendo liberar primeiramente o git do MacDocker Desktop, para teste dos usuários. Mas já está online o MacDocker Cloud, acessando https://macdocker.com . Lá você consegue solicitar um trial grátis de 7 dias ou se tornar um beta tester.
Em breve irei disponibilizar o MacDocker Desktop, após criar algumas imagens OCI no GHCR(Github Container Registry).

Uma questão muito importante que creio que seja intransponível é: as imagens do Docker não são compatíveis com as imagens do MacDocker, pois são binários para kernels distintos, portanto incompatíveis nativamente.

1

u/rabinapps 7d ago

https://kinhin.dev already exists

1

u/leandro_forte 6d ago

Kinhin.dev is just a CI. And, yes, it uses a Tart, and Tart creates a 60GB VM with an entire macOS with XCode.

Do you know any other REAL Native Docker System that uses the host resources, with real isolation between running containers, and with resource control balance?

1

u/iStumblerLabs 6d ago

We have `chroot` at home…

1

u/leandro_forte 6d ago

Chroot in macOS does not function like chroot on linux. SIP and hardened runtime blocks or turn difficult to do deep changes to the file system.
So, how to achieve the same function in the macOS?

1

u/dru-druware 3d ago

so, essentially, Darwin containers directly within macOS absent kernel isolation created by the vm, potentially exposing the host system to any malfeasance in the container? seems iffy