News for hackers. Stuff that matters.
Re:macOS in Docker Container by nine_k on Wednesday July 31, 2024 @03:05AM (#41116977)
So, to clarify things: it's QEMU running in a container, and macOS running under QEMU inside it.

This is really nice WRT the ease of installation: no manual setup steps and all.

This likely expressly violates the [macOS EULA], which says: «you are granted a limited, non-exclusive license to install, use and run one (1) copy of the Apple Software on a single Apple-branded computer at any one time» — because the point is to run it not on a Mac. So, pull it and keep it around; expect a C&D letter come any moment.

[macOS EULA]: https://www.apple.com/legal/sla/docs/macOSMonterey.pdf (Other versions contain the same language.)

Re:macOS in Docker Container by jbverschoor on Wednesday July 31, 2024 @03:14AM (#41117017)
(iii) to install, use and run up to two (2) additional copies or instances of the Apple Software, or any prior macOS or OS X operating system software or subsequent release of the Apple Software, within virtual operating system environments on each Apple-branded computer you own or control that is already running the Apple Software, for purposes of: (a) software development; (b) testing during software development; (c) using macOS Server; or (d) personal, non-commercial use
Re:macOS in Docker Container by nine_k on Wednesday July 31, 2024 @03:52AM (#41117173)
Indeed. That would cover a conventionally installed VM, like VirtualBox.

But this is packaged as a Docker image, and Docker is Linux-specific. Linux is not officially supported by Apple on their hardware, and is certainly not prevalent on it. I doubt that the intended target audience of this project is limited to Asahi Linux.

Re:macOS in Docker Container by rbut on Wednesday July 31, 2024 @04:08AM (#41117243)
Docker can run on macOS (albeit in a VM), but its still running on a Mac "that is already running the Apple Software". So its a perfectly valid option for Mac owners, even if its a VM + container + VM deep.
Re:macOS in Docker Container by monocasa on Wednesday July 31, 2024 @05:37AM (#41117638)
This requires kvm exposed in the container. Does docker on mac support kvm?
Re:macOS in Docker Container by nine_k on Wednesday July 31, 2024 @06:25AM (#41117863)
AFAICT, with QEMU, access to KVM is only required if you care about performance %) Otherwise it can emulate everything for you.
Re:macOS in Docker Container by monocasa on Wednesday July 31, 2024 @06:46AM (#41117968)
This dockerfile explicitly enables kvm in a way that will cause qemu to fail if it's not present.
Re:macOS in Docker Container by prmoustache on Wednesday July 31, 2024 @03:58AM (#41117204)
> I doubt that the intended target audience of this project is limited to Asahi Linux.

I guess that part of the license is meant to automatically disqualify an apple branded computer running a linux distro as host OS from running MacOS in a VM: "on each Apple-branded computer you own or control that is already running the Apple Software"

Some smart ass might argue that "already running the Apple software" doesn't mean at the exact same time but more like "I am still running it sometimes as dual boot" but I am not sure this would pass the court test.

And since I believe docker on MacOS runs on linux VM, so this would be running qemu on top of a linux vm on top of MacOS.

I can't see any legit use of this. Anyone who would need automatized and disposable environments for CI/CD would simply use UTM on mac minis: https://docs.getutm.app/scripting/scripting/

Re:macOS in Docker Container by exe34 on Wednesday July 31, 2024 @04:32AM (#41117361)
I run Linux on a Mac book air, so this would allow me to run macos in a controlled environment if I could think of a good reason to do so.
Re:macOS in Docker Container by EspadaV9 on Wednesday July 31, 2024 @06:24AM (#41117860)
Not sure that would be the case since it also includes this part

> that is already running the Apple Software

Running Linux on Apple hardware would not follow that part of the EULA.

Re:macOS in Docker Container by exe34 on Wednesday July 31, 2024 @07:07AM (#41118076)
good thing I can't think of any reason to run macos.
Re:macOS in Docker Container by ramses0 on Wednesday July 31, 2024 @07:56AM (#41118391)
The Tao of Programming, 7.3:

""" "Corporate Headquarters has commanded," continued the magician, "that everyone use this workstation as a platform for new programs. Do you agree to this?"

"Certainly," replied the master, "I will have it transported to the data center immediately!" And the magician returned to his tower, well pleased.

Several days later, a novice wandered into the office of the master programmer and said, "I cannot find the listing for my new program. Do you know where it might be?"

"Yes," replied the master, "the listings are stacked on the platform in the data center." """

https://quasi.in/digital/ttop.html#Book7

Re:macOS in Docker Container by exe34 on Wednesday July 31, 2024 @08:01AM (#41118423)
well put.
Re:macOS in Docker Container by Modified3019 on Wednesday July 31, 2024 @04:17PM (#41122993)
I don’t understand what this is trying to say.
Re:macOS in Docker Container by throwaway-blaze on Wednesday July 31, 2024 @08:35PM (#41125062)
They're using it as a shelf.
Re:macOS in Docker Container by ramses0 on Thursday August 01, 2024 @11:55AM (#41130528)
Back in 'ye olden days, people used to print out programs... nay, they even used to _hand-write!_ programs before they began typing, because keyboard-time was valuable (nevermind compilation/computation/debugging time).

Serial ports were slow, grep wasn't really a thing, so having a printout (or "listing") of your program was a more efficient way (or only way!)to debug your program after the fact. https://www.youtube.com/watch?v=tJGrie7k97c

Back in the 90's, I had some programming classes in high school where there were 30 chairs, but 15 computers (around the edge)... bring your own 360kb floppy disk! So you had a real incentive (and a strict teacher) who insisted that you wrote out your program ahead of time, show it to her for a first-pass/feedback, and _then_ you'd get to go type it on the computer and see if it worked. Submissions were via printouts (of the program, aka "listing", along with the output) which she then took home and graded.

The whole document IMHO is worth a read, but is definitely a product of it's time (70's/80's/90's). https://en.wikipedia.org/wiki/The_Tao_of_Programming

Stick tongue firmly in cheek, empty your cup, and enjoy the ride!

Edit: ...and the relationship to the cantankerous original comment who "couldn't figure why they'd want to run OSX?", this is the zen-koan sarcastic response of: "use it as a platform for development" (ie: stack your papers on top if it)

Re:macOS in Docker Container by pzo on Wednesday July 31, 2024 @09:40AM (#41119083)
Some unfortunately needs Xcode for building iOS or macOS apps locally even if you are coding in unity, flutter, react native, qt, unreal
Re:macOS in Docker Container by rfoo on Wednesday July 31, 2024 @08:25AM (#41118610)
I believe it matches the base term, as you are allowed to run only one copy of the Apple software on an Apple hardware, unconditionally.

It could be in a VM.

Re:macOS in Docker Container by thfuran on Wednesday July 31, 2024 @08:35AM (#41118671)
And I guess once you've booted the VM, you are suddenly permitted to boot two more, as long as you have a lawyer on retainer just in case.
Re:macOS in Docker Container by jkaplowitz on Wednesday July 31, 2024 @08:38AM (#41118685)
Docker actually ships their easy-to-use and commercially supported Docker Desktop product for macOS, which uses Apple's standard virtualization framework under the hood. I think it then runs the Docker containers within a Linux VM that it manages.

For people who want an open-source CLI solution rather than a commercial product which for larger businesses requires payment, there's also colima which does roughly the same thing.

So, lots of people very successfully use Docker on macOS, including on Apple hardware.

This particular software would need nested virtualization to be highly performant, but at least on M3 or newer Macs running macOS 15 or newer, this is now supported by Apple's virtualization framework:

https://developer.apple.com/documentation/virtualization/vzg...

So, if that's not easy to do in a useful and performant way now, it will absolutely be possible in the foreseeable future. I'm sure that the longtime macOS virtualization product Parallels Desktop will add support for nested virtualization quite soon if they haven't already, in addition to whatever Docker Desktop and colima do.

(Tangent: Asahi Linux apparently supports nested virtualization on M2 chips even though macOS doesn't.)

Re:macOS in Docker Container by nine_k on Wednesday July 31, 2024 @11:17AM (#41119955)
Running Linux in a VM (for Docker) to run an emulator (QEMU) in it to run macOS in that looks to me like a senseless waste of resources. Linux and Docker add no value into the mix here.

The same result can be achieved by running macOS right in the VM. This can be extra efficient since both the host OS and the guest OS are macOS, and the VM could use this fact.

It may make sense to run macOS in an emulator like QEMU under macOS, if the host version us ARM and the guest version is x64 (or vice versa). But I don't see where Linux and Docker would be useful in this case.

Re:macOS in Docker Container by jkaplowitz on Wednesday July 31, 2024 @01:55PM (#41121486)
I agree the particular combo I was discussing is likely not very useful when compared to just directly virtualizing macOS directly, except in niche cases.

One such case, however, is when the user is already managing Linux Docker containers for other parts of their development or testing workflow and wants to manage macOS containers with the same tooling. That’s legitimate enough, especially when it ends up supporting nested virtualization of the same architecture and not true emulation, to keep the performance penalty modest enough.

Re:macOS in Docker Container by wildzzz on Wednesday July 31, 2024 @10:41AM (#41119612)
So basically you can run macOS however you want as long as you're already running macOS on Apple hardware.

The question I've always had is how enforceable is that really? Obviously the whole point of Apple making macOS freely available is to run it on Apple hardware. They don't give it out for free to run on other hardware but can they really do anything about that other than require you to enter a serial number to download an image? If they really cared, they would just do something like hashing the serial number and current date and time against a secret key (maybe inside a read-only portion of the TPM) and only Apple would be able to verify that the hardware is legit. You would need to somehow expose the TPM to the hypervisor to be able to generate hashes for macOS to verify it's license. Clearly this is not a huge problem for Apple because they would already be doing this if it was an issue.

Re:macOS in Docker Container by pjmlp on Wednesday July 31, 2024 @12:14PM (#41120495)
Via surprise audits from organisations like BSA, in collaboration with the police.

https://www.bsa.org/

Re:macOS in Docker Container by skeaker on Wednesday July 31, 2024 @01:12PM (#41121058)
For organizations, sure, but has this ever been done to an individual?
Re:macOS in Docker Container by pjmlp on Wednesday July 31, 2024 @01:48PM (#41121415)
Individuals most likely not.
Re:macOS in Docker Container by angulardragon03 on Wednesday July 31, 2024 @11:25AM (#41120031)
It’s sort of enforceable - Apple’s own virtualisation framework that lots of VM providers use (on Apple Silicon) actually enforces a hard cap of two guests, and won’t allow you to spawn more.

With other hosts, it’s kind of an Adobe approach - you either weren’t gonna buy a Mac anyways, or you might be tempted to buy a Mac after using macOS in a VM. Realistically, it’s not worth Apple coming after you unless you’re an enterprise making your money by breaking the EULA.

Re:macOS in Docker Container by obituary_latte on Wednesday July 31, 2024 @10:58AM (#41119786)
Probably as enforceable as any other EULA. Windows surely has similar language. I'd guess that somewhere buried deep in the agreements, or somewhere, it says they can audit your usage somehow. Does it ever happen? I'd be curious to know.
Re:macOS in Docker Container by naikrovek on Wednesday July 31, 2024 @12:37PM (#41120732)
Windows doesn’t have similar language. Not directly, anyway. Depending on the edition of Windows you purchase and how your overall license agreement works, you get anywhere from zero to ten VM licenses per paid Windows license.

I’m omitting a few details for brevity (MS licensing is nuts when you get into the weeds).

Re:macOS in Docker Container by ForOldHack on Wednesday July 31, 2024 @08:37PM (#41125081)
Apple branded machine. I got some of those nifty apple stickers to brand machines. MacBooks and Macpros as well as iMacs have serial numbers. They already have their whole arm ... I will just remind them again. Do not anger Linux wizards. They put Linux on an iPod.
Re:macOS in Docker Container by ForOldHack on Wednesday July 31, 2024 @08:33PM (#41125043)
Oh thank God! Now I have use for my macplus badge. Just cut and glue, and vola apple branded. It was running system 6, so Snow leopard. I did install QuickTime and it basically destroyed my windows, but it's a port of the MacOS. This elua has more holes in it than a windows 95 login screen. I am in control.
Re:macOS in Docker Container by paulmd on Wednesday July 31, 2024 @09:55PM (#41125503)
maybe apple, but intel would never fall for such a simplistic ploy. their lawyer are a million billion miles ahead of you, kiddo.

https://i.imgur.com/fop769Z.jpeg

(too bad they didn't pay such close attention to the power profiles their partners were attaching the intel brand name to...)

Re:macOS in Docker Container by jamesrr39 on Thursday August 01, 2024 @05:14PM (#41133695)
> Intel reserves the right to ask you to stop using the logo [...]

Serious stuff!

Re:macOS in Docker Container by znpy on Wednesday July 31, 2024 @04:20AM (#41117309)
> you are granted a limited, non-exclusive license to install, use and run one (1) copy of the Apple Software on a single Apple-branded computer at any one time»

In that case... If I run Asahi Linux on my apple-silicon macbook pro as main operating system and then run macOS in a container I should be fine.

Re:macOS in Docker Container by prmoustache on Wednesday July 31, 2024 @04:24AM (#41117327)
See the rest of the license, the host must be "already running the MacOS operating system" which I understand as host OS, not as capable of still running it because the sshd hasn't been wiped of a MacOS install.
Re:macOS in Docker Container by m463 on Wednesday July 31, 2024 @04:44AM (#41117409)
You can run linux on a mac. In fact older intel used macs are inexpensive and run pretty well with little noise.

ubuntu installs and runs easily. Other versions of linux - it depends.

Re:macOS in Docker Container by dqh on Wednesday July 31, 2024 @08:08AM (#41118494)
Ubuntu 24.04 is a disaster in my mid-2015 MBP. Ubuntu 22.04 is surprisingly good though.
Re:macOS in Docker Container by resource_waste on Wednesday July 31, 2024 @09:33AM (#41119031)
To be fair, I'm not sure any linux veterans are using Ubuntu. Its a popular OS, but its not a good OS. (Think terrible pop music that teenagers will still listen to)

Even Debian has lost its favorability by having sooo much legacy bloat, bugs, and outdated kernels that wont run Nvidia GPUs(2023) or other recent peripherals.

I'd be much more curious how Fedora or OpenSUSE hold up.

Re:macOS in Docker Container by skeledrew on Wednesday July 31, 2024 @10:42AM (#41119622)
How do you define "veteran"? I've been a Linux-only user for 10 years, and 9.5 of it is strictly with Kubuntu.
Re:macOS in Docker Container by resource_waste on Wednesday July 31, 2024 @03:10PM (#41122374)
Feeling old when I say I'm at 18 years.

But I think its an experience thing rather than 'years' thing. If you only used Ubuntu for 10 years, you wont know what modern linux is like.

You sound like a Kubunutu expert, not a linux expert.

Re:macOS in Docker Container by skeledrew on Wednesday July 31, 2024 @04:38PM (#41123184)
What is it that makes one a "Linux expert"? Knowing bash/awk well? Embracing the pain that some other distros are? Using Vim? If it's any of those then I'm definitely no expert, as I primarily use Python whenever bash starts to get even a bit complex, selected Kubuntu because I didn't have to deal with a bunch of source issues I had with Ubuntu (due to licensing; also avoided Arch as I heard it's a nightmare, but occasionally work on a CentOS box as part of my job), and do almost everything re text in Emacs.
Re:macOS in Docker Container by mynameisvlad on Wednesday July 31, 2024 @04:43PM (#41123232)
"Sorry a decade of use is not enough to be considered an expert. Also your experience is useless because it's on a distro I don't like."

This is just pointless gatekeeping doubled down on at this point. People can be experts and use Kubuntu. People can be veterans and use Ubuntu. People can be absolute beginners and use Arch or OpenSUSE or literally any other distro. Use of distro is in no way shape or form indicative of experience other than that some are easier to get started with for absolute beginners than others. But that doesn't make them any less good.

It's a personal choice with each options having its own pros and cons. Not some indicator of experience or knowledge.

Re:macOS in Docker Container by resource_waste on Thursday August 01, 2024 @09:33AM (#41128908)
Debian-family distros are literally outdated.

Its not even gatekeeping in 2024. Linux pros are avoiding debian-family.

Why would you use a buggy, slow, outdated distro when we have fast, modern, and fewer bugs?

This is an ignorance thing, much of the linux community repeats what they did in the past, afraid to change.

Re:macOS in Docker Container by mynameisvlad on Thursday August 01, 2024 @11:18AM (#41130071)
> It’s not even gatekeeping in 2024. Linux pros are avoiding debian-family.

You’re not a “Linux pro” (not that that’s a thing in the first place ffs), so your opinion doesn’t matter, as much as you might think it does.

Glad to see pointless rabid fanaticism is still a thing in 2024, even in the Linux community.

Honestly, if you care this much about what distro someone uses, you need to get a life. This is by far the most pointless hill to die on.

Re:macOS in Docker Container by dqh on Wednesday July 31, 2024 @06:40PM (#41124280)
I’ve been continually using Linux for various purposes since the late 90s, and recently wrote a non-trivial kernel module for an embedded device. So I’m veteran-ish.

I tried Ubuntu on my MBP because I thought its popularity would mean the best chance of things working out of the box. I’m long past having time to spend on getting basic things working.

Re:macOS in Docker Container by elliotto on Wednesday July 31, 2024 @04:52AM (#41117445)
Who cares lol
Re:macOS in Docker Container by mosselman on Wednesday July 31, 2024 @08:02AM (#41118428)
I don’t think Apple would feel very threatened by this indeed. I share the who cares lol
Re:macOS in Docker Container by user_7832 on Wednesday July 31, 2024 @05:04AM (#41117498)
> So, to clarify things: it's QEMU running in a container, and macOS running under QEMU inside it.

A bit tangential but is this more performant/"better" than running MacOS on say Hyper-V? I understand my zen 4 laptop anyway won't allow GPU acceleration, I'm only looking to run a few apps (and maybe Safari) on it.

Re:macOS in Docker Container by ptspts on Wednesday July 31, 2024 @07:26AM (#41118184)
My guess is that macOS on Hyper-V is faster.
Re:macOS in Docker Container by actionfromafar on Wednesday July 31, 2024 @06:09AM (#41117784)
How much of these EULAs are actually enforceable though, and in which jurisdictions?

Also, wouldn’t it be the end user potentially in violation of the EULA, not the git repo provider?

Edit: agreed about OS images, that does not look legit.

Re:macOS in Docker Container by nine_k on Wednesday July 31, 2024 @06:31AM (#41117887)
Fair. But the docker image provider would be in violation, never having received a license to redistribute macOS images. Without these, the seamless usability aspect is gone, though the repo remains pretty useful because it automates all other steps.
Re:macOS in Docker Container by windexh8er on Wednesday July 31, 2024 @08:58AM (#41118824)
It's trivial to build these containers by grabbing the install images from Apple directly. Beyond that this is all covered in the documentation.

I guess I'm curious why you're so focused on this violating anything? Apple clearly doesn't care as folks like myself have used it for years. Apple's target market is hardware buyers, not people who do things like this. If this actually impacted sales, sure - but Apple doesn't sell OSX anymore.

As an aside the sickcodes work is great for people wanting to leverage Apple's "Find My" network with non-Apple devices by leveraging OpenHaystack [0].

[0] https://github.com/seemoo-lab/openhaystack

Re:macOS in Docker Container by rty32 on Wednesday July 31, 2024 @09:23AM (#41118971)
I assume EULA is mainly intended for preventing companies from running Hackintosh at a massive scale than aimed at individuals -- although build your business/infrastructure based on Hackintosh is a very questionable business and technical decision by itself.
Re:macOS in Docker Container by 7bit on Wednesday July 31, 2024 @06:30AM (#41117884)
GitHub repost are taken down all the time because they offer means to violate EULAs. See youtube-dl which was taken down couple of months back.
Re:macOS in Docker Container by hoistbypetard on Wednesday July 31, 2024 @06:52AM (#41117993)
This youtube-dl?

https://github.com/ytdl-org/youtube-dl

Did it get taken down again? The takedown I remember was a few years ago, and GitHub announced some policy changes to make it harder for that to happen when they very loudly reinstated it:

https://github.blog/news-insights/policy-news-and-insights/s...

Re:macOS in Docker Container by manojlds on Wednesday July 31, 2024 @07:07AM (#41118074)
Why are you talking as though this is a new project. It's been around for years
Re:macOS in Docker Container by hundchenkatze on Wednesday July 31, 2024 @08:10AM (#41118501)
> expect a C&D letter come any moment.

This repo is 4 years old... I don't think it's coming.

Re:macOS in Docker Container by promiseofbeans on Wednesday July 31, 2024 @08:32AM (#41118651)
Hey, not if you run it on a mac running Asahi
Re:macOS in Docker Container by Kab1r on Wednesday July 31, 2024 @07:11PM (#41124508)
If only it worked on ARM
Re:macOS in Docker Container by riiii on Wednesday July 31, 2024 @09:08AM (#41118884)
I like the moaning sound the EULA makes when it gets violated.
Re:macOS in Docker Container by ctoth on Wednesday July 31, 2024 @11:32AM (#41120091)
Can I get a whole bunch of Apple stickers and brand the heck out of an old Dell r630 Server and run this on it? Or how about a cattle brand with an Apple logo?
Re:macOS in Docker Container by arilotter on Wednesday July 31, 2024 @02:05PM (#41121599)
i remember making this joke a decade ago on the tonymacx86 forums, lots of people did it for the lulz
Re:macOS in Docker Container by sangnoir on Wednesday July 31, 2024 @03:25PM (#41122522)
> because the point is to run it not on a Mac.

Says who? My Mac Mini runs Linux as the host OS, this project allows me to run MacOS as a guest OS on Apple hardware on demand.

Re:macOS in Docker Container by userbinator on Wednesday July 31, 2024 @08:43PM (#41125114)
Hackintosh has been around for almost 2 decades and AFAIK Apple hasn't threatened legal action on anyone except those trying to profit monetarily from it (the only one that comes to mind being Psystar).

Apple now even publicly distributes macOS from its site with no authentication required, something that certainly wasn't true in the early days of Hackintosh.

Given that some Hackintoshers may be doing it for the purposes of "security research" (bug bounty chasing), which indirectly benefits Apple, I don't think they will change the unsaid stance anytime soon.

On the other hand, its attempts at destroying right-to-repair and third-party OEM parts shows what it actually worries about.