Live data from Hacker News

macOS in QEMU in Docker

github.com

111–120 of 190 posts

Re: macOS in QEMU in Docker

#111

I just want a good CI/CD system for macOS to build iOS apps without needing to buy a farm of Mac Minis, or even buy a Mac, is that too much to ask?

According to Apple software license agreements, yes, it is too much to ask. You can not legally run Mac OS on non-Apple hardware. But don't be sad, their new Mac Pro is fantastic .

I'm not sure that to run a CI you have to violate the Apple license. I mean most core components of macOS (the Darwin project) are actually open source, and thus can be built and used freely. And for a CI you don't need a GUI and other stuff, only the kernel and the compiler basically. So maybe it's possible to compile a version of Darwin so close to the real macOS that has the bare minimum to run the compiler to build and test software.

Of course the problem are the SDK that you need to use to build most software, they are obviously proprietary, but does its license say that they can only be used to compile software on a real Mac?

Re: macOS in QEMU in Docker

#112

Earlier quoted context omitted.

According to Apple software license agreements, yes, it is too much to ask. You can not legally run Mac OS on non-Apple hardware. But don't be sad, their new Mac Pro is fantastic .

I'm not sure that to run a CI you have to violate the Apple license. I mean most core components of macOS (the Darwin project) are actually open source, and thus can be built and used freely. And for a CI you don't need a GUI and other stuff, only the kernel and the compiler basically. So maybe it's possible to compile a version of Darwin so close to the real macOS that has the bare minimum to run the compiler to bui…

Yes, the ToS for the SDKs do say that.

Re: macOS in QEMU in Docker

#113
post #17
post #15

Does this break the user agreement for macOS?

Only if you do it on a non-Apple comoputer. If you install linux on your mac, then follow the guide I believe it should be fine.

Not a lawyer, etc, but I read this as requiring the VM to be run on macOS host:

allowed "to install, use and run up to two (2) additional copies or instances of the Apple Software within virtual operating system environments on each Mac Computer you own or control that is already running the Apple Software"

https://www.apple.com/legal/sla/docs/macOSCatalina.pdf

Re: macOS in QEMU in Docker

#114
post #77

Earlier quoted context omitted.

I don't care though. What I care about is that it's a pain in the butt to do CI/CD pipelines for an application with iOS/OSX support. So if someone has a headless OS X contraption on offer, I want to hear some more about it. The last time I set this up, a manager decided he wanted a laptop like the rest of us instead of the iMac he got. He asked semi-jokingly if someone wanted the machine for anything and I said "Yes…

> So if someone has a headless OS X contraption on offer, I want to hear some more about it. you still legally need to run it on an actual Mac due to Apple's terms of service though... so is there really a lot gained ?

If a tree falls in a forest and no one is around to hear it, does it make a sound?

Re: macOS in QEMU in Docker

#115
post #90
post #87

Earlier quoted context omitted.

> old Microsoft of the 90s Not to jackknife the thread, but most developers were born in the 90s and do not remember this Microsoft. The engineering and dev managers DO remember this Microsoft. So while I agree somewhat they are trying to repair their image, with the younger crowd they only know MS as Minecraft, VS Code, Azure, Github. More people probably got exposure to Linux via WSL than all of the previous instal…

The only real change I've seen to Microsoft since the 90s is that it finally "embraced" open source in markets it was losing in when the only other alternative was irrelevance. They're still playing dirty tricks on open source. They're just not stupid enough to use the ones that would do more harm than good.

Most companies are only using open source as a weapon [1].

When people say that "MS gets open source now", what it really means is the MS gets how OS can be used to further its goals. Not that they have fundamentally changed.

MS will have graduated to the next level of maturity when it open sources something that is strategic to the ecosystem and the ecosystem as a whole benefits (Windows NT 4?) or something that is obviously making them money.

[1] https://www.gwern.net/Complement

Re: macOS in QEMU in Docker

#116
post #98

Earlier quoted context omitted.

Okay, I know how docker can mean containers, and I agree that Dockerfiles are quite similar to makefiles, but how does docker relate to source control?

Docker keeps a history of changes to the container with layers, and you might arguably treat it like version control. maybe "docker history" ~ "git log"?? tags=branches? Docker isn't one thing, so it's ALL grey. It's not really make. It's not really a vm. It's not really even reproducible. One thing is for certain - it's hard to describe docker to new folks so they get it. "it's sort of like netflix, for cows, but in…

That's the most insane use of Docker I've ever heard of.

Re: macOS in QEMU in Docker

#117
post #54

Earlier quoted context omitted.

It's an unenforced provision of the license agreement. No attorneys are recommending it but it's happening. I wouldn't start your own CI firm with it though. Unlike Microsoft, Apple has no motives to send the BSA after anyone. Pretty sure they've only used them for egregious copyright violations like the commercial Hackintoshes.

> Apple has no motives to send the BSA after anyone ... until your virtualization layer starts having a material impact on their precious hardware sales. You cannot build business-critical systems on contractual clauses being "unofficially unenforced".

Probably the majority of macOS CI/CD use cases are materially beneficial to apple. Most people just want to automate building software for macOS/iOS. Making it easy to produce software for their products, just strengthens their ecosystem.

Re: macOS in QEMU in Docker

#119
post #77

So this is pretty misleading. It's really a full system emulator (qemu) running inside Docker, using root privileges on the container that make the isolation very weak (--privileged). It also uses hardware assisted virtualization (KVM) which is not going to be available most of the time Docker is. You can think of the Docker platform itself as subset of the Linux platform. With many common features removed by default…

I don't care though. What I care about is that it's a pain in the butt to do CI/CD pipelines for an application with iOS/OSX support. So if someone has a headless OS X contraption on offer, I want to hear some more about it. The last time I set this up, a manager decided he wanted a laptop like the rest of us instead of the iMac he got. He asked semi-jokingly if someone wanted the machine for anything and I said "Yes…

That is exactly what I was thinking of. I don't want to buy dedicated hosts from MacStadium. I got native iOS builds and Unity buidls that would work well with this. Isolation is not as big of a concern.

I too would like to hear if anyone has been able to pull this off.

EDIT: And what about licensing?

Re: macOS in QEMU in Docker

#120

Earlier quoted context omitted.

> So if someone has a headless OS X contraption on offer, I want to hear some more about it. you still legally need to run it on an actual Mac due to Apple's terms of service though... so is there really a lot gained ?

If a tree falls in a forest and no one is around to hear it, does it make a sound?

If we are going to divert into Zen koans and non-dual philosophies, then it is definitively "yes it did". The falling away of the perception of an intrinsicly-existing self doesn't change that there's still perception. It would make a sound the same way there is a sound made when one hand claps.

Back on topic though: it's too bad Apple doesn't allow licenses for running things headlessly like this.

Post reply on HN