Live data from Hacker News

macOS Container Machines

github.com

301–310 of 457 posts

Re: macOS Container Machines

#301
post #180

Earlier quoted context omitted.

https://github.com/apple/container/blob/main/docs/technical-... read documentation mr. rare breed

Like, this doesn’t answer when to use this vs Docker. Any reference there?

This is not the apple container framework / that’s the docker alternative. This is a project to easily run full Linux machines in macOS containers.

Re: macOS Container Machines

#302

Earlier quoted context omitted.

it differs by lacking all the cool options that makes vmware and virtualbox good products, but apple users will praise it as a benefit "bind mounts? I'm better without it"

Funny how confidently people can mock while knowing nothing about the specific tech discussed and the different targets. I'd google: VirtualBox vs containers.

It's called a container machine but it's a virtual machine. I quote from https://github.com/apple/container/blob/main/docs/technical-...

> container runs containers differently. Using the open source Containerization package, it runs a lightweight VM for each container that you create. This approach has the following properties:

> * Security: Each container has the isolation properties of a full VM, using a minimal set of core utilities and dynamic libraries to reduce resource utilization and attack surface.

> * Privacy: When sharing host data using container, you mount only necessary data into each VM. With a shared VM, you need to mount all data that you may ever want to use into the VM, so that it can be mounted selectively into containers.

> * Performance: Containers created using container require less memory than full VMs, with boot times that are comparable to containers running in a shared VM.

So: you build it as a container image and MacOS starts a VM to run it.

Edit: quite unusually for a container it runs systemd. They give an example "systemctl start postgresql".

Re: macOS Container Machines

#303

Earlier quoted context omitted.

sandbox profiles?

macOS sandboxing is deliberately limited just enough to prevent anyone from truly implement Darwin-on-Darwin containers. People have been discussing about this for a while, see https://github.com/apple/container/discussions/611 In general I understand the rationale behind Apple's decision. They sell hardware, and there's real demand for macOS on servers to run build jobs and other Mac-only tools. Giving you the abili…

and how is this, having containers run hardware one owns, a bad or even shameful idea, given people do it and want to do it with their hardware all the time?

Re: macOS Container Machines

#304
post #29

Earlier quoted context omitted.

Ah, the Darwin/BSD Subsystem for Linux.

Not quite, it’s still a VM. And while it supports virtio balloon for growing RAM, it doesn’t yet support releasing that RAM back to the host. And there isn’t a convenient way to shrink the sparse disk images as they grow yet, either.

This is not a problem at all as most Apple computers come with plenty of RAM and lots of disk space! We are so lucky that Apple engineers always think so differently into the future!

Re: macOS Container Machines

#305

To clarify a few comments here: this is not only OCI containers: container machines add support for persistence and filesystem mounting, making container machines a great lightweight Linux environment for developers using macOS. More details here: https://developer.apple.com/videos/play/wwdc2026/389

Still feels like a apple-ified microvm

Well yeah it’s a simple vm…

Re: macOS Container Machines

#306
I'm pretty sure this is not the use case at all but man do I miss bootcamp. Even for games if we could just run linux without a need for crossover, gaming on mac machines would be a dream.

Re: macOS Container Machines

#307
post #275
post #256

Earlier quoted context omitted.

Very different: Linux running in a virtual machine can't bind mount into a macOS host's filesystem. So they use virtiofs.

This applies to both containers and container machines though, right?

Containers (those popularised on Linux by Docker) are built on Linux primitives like cgroups and namespaces, so they're running directly on the same kernel, same VFS, often the same FS, etc. Their isolation properties rely on (a) all those Linux features working as expected, and (b) the container runtime setting them up properly.

Depending on your threat model, that's fine, but a lot of people (including me) will say that containers are not a security mechanism.

But macOS requires[1] virtualisation for containers anyway; the security is just a bonus.

[1] at least for a real Linux kernel...

Re: macOS Container Machines

#308
post #26

OrbStack works really well for me. I wonder how it’s compared to this performance wise

(OrbStack dev here.) Instead of Virtualization.framework, we have a custom Rust virtualization stack with custom devices and protocols for things like filesystem sharing. It's a highly optimized vertically integrated stack specifically for running our Linux machines and containers. Our biggest perf/resource gain is dynamic memory, which reduces memory usage a lot by releasing unused memory back to macOS. Nothing else…

Amazing software, thanks!

Re: macOS Container Machines

#309
Oh, I hoped it would be macos contained in those containers. Container for Linux are in millions, while I don't know if there are any with macos inside.

Re: macOS Container Machines

#310

This is all fine and dandy, but where are the native Darwin Jails Apple? Still scared that people will filling whole rooms of Mac Minis if you allow them to have multiple macOS containers and not only up to two fat VMs per machine?

[deleted]
Post reply on HN