macOS Container Machines
Posted by timsneath 7 hours ago
Comments
Comment by timsneath 6 hours ago
Comment by bogantech 51 minutes ago
How is this different to bind mounts
Comment by jjtheblunt 2 hours ago
Which kernel is running, and is it hosted in hypervisor.framework, as is done with UTM (when not using the qemu mode)?
Comment by Scarbutt 2 hours ago
Comment by Onavo 6 hours ago
Comment by CGamesPlay 5 hours ago
Comment by AlexB138 5 hours ago
Comment by gsnedders 5 hours ago
Comment by selcuka 5 hours ago
Comment by rvz 3 hours ago
Comment by LoganDark 5 hours ago
Comment by TylerE 5 hours ago
Comment by qalmakka 1 hour ago
Comment by pjmlp 1 hour ago
I am convinced that if POSIX subsystem was UNIX serious, GNU/Linux would never taken off on PC, and the whole would be divided between SGI, HP-UX, Solaris, Aix and Windows NT.
Comment by hnlmorg 1 hour ago
The reason Linux grew in the 90s was because it was part of the hacker culture. Not because better options didn’t exist.
Kids liked the fact that Linux was a free-for-all, anything-goes, platform. It wasn’t stuffy like Unix and it wasn’t proprietary like Windows.
Then those kids grew up and became decision makers themselves. And we started to see Linux replace FreeBSD and commercial Unixes.
Comment by pjmlp 31 minutes ago
Minix was a toy OS for university teachings.
Coherent was commercial.
Nothing else was there on the PC market.
Comment by noduerme 4 hours ago
I never want to deal with that again ;)
[edit] fwiw, Termux on Android is similarly a fun pseudo-environment. It's a nice and helpful toy.
Comment by TylerE 4 hours ago
Comment by bschwindHN 2 hours ago
https://old.reddit.com/r/ProgrammerHumor/comments/96ufiz/pro...
Comment by rpeden 4 hours ago
That's handy when you're entering paths in a Cygwin/MSYS Bash shell, but might not help much if you're trying to parse or otherwise work with existing patgh variables composed with backslashes.
Comment by TylerE 3 hours ago
Comment by noduerme 1 hour ago
Doing retail office deployments of custom code on employee computers is a weird niche, and you find whatever works and hope you can maintain it somehow. Cygwin was awesome though, saved me a ton of time and the client a lot of money for the moment. (The client later stipulated to all future franchisees that they had to buy only Macs, lol)
Comment by kergonath 1 hour ago
You still can, and it still works exactly the same way.
Comment by iririririr 24 minutes ago
if you must use windows, it's because you will compile for windows. so you install MSYS, which is a linux distro-ish compiled native for windows. and do your work.
wsl2 (and this apple thing) is just a meme. if you're working in it, you're better of just installing Linux or ssh'ing to a server.
Comment by _blk 4 hours ago
Comment by michaelsbradley 4 hours ago
Comment by kevinminehart 1 hour ago
Comment by dented42 32 minutes ago
Comment by pjmlp 2 hours ago
Comment by jayd16 5 hours ago
Comment by pseudosavant 1 hour ago
Comment by qalmakka 1 hour ago
Comment by jorisw 18 minutes ago
Comment by qalmakka 17 minutes ago
Comment by adastra22 17 minutes ago
Comment by qalmakka 13 minutes ago
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 ability to run multiple containers on a single Mac would end up turning a 10 Mac Mini order into a 2 Mac Minis order for most people. Rest assured, even if it would be technically possible they'd find a way to cap it somehow via the EULA or whatever
Comment by golem14 2 hours ago
I can create docker-images with docker compose, or use something like colima, which this seems to be close to (that should have some advantages over docker, although my hope of circumventing W^X page protection did not pan out).
I was perplexed that the repository does not put these container machines in context. The seem to be close to colima? When should I use which option (docker, collima, container machines ?)
Maybe others wonder too but are ashamed to ask. I have no shame ;)
Thanks for any pointers
Comment by djsavvy 1 hour ago
Comment by bogantech 49 minutes ago
Comment by klohto 2 hours ago
Comment by startakovsky1 50 minutes ago
Comment by Havoc 8 minutes ago
Comment by blahgeek 6 hours ago
Comment by kdrag0n 6 hours ago
Our biggest perf/resource gain is dynamic memory, which reduces memory usage a lot by releasing unused memory back to macOS. Nothing else supports this, including Containerization.
I gave Container Machines a try and it seems to be much closer to OCI containers with a default bind mount than OrbStack machines. It has fewer integrations and doesn't run systemd or any other normal init system, so it's hard to run services.
Comment by rswail 36 minutes ago
This post reminded me to buy a license, just done it, worth it for the time saved.
Comment by d3v1an7 3 hours ago
Comment by mescalito 5 hours ago
> I gave Container Machines a try and it seems to be much closer to OCI containers with a default bind mount than OrbStack machines. It has fewer integrations and doesn't run systemd or any other normal init system, so it's hard to run services.
The linked md document says:
> Real Linux services for testing. Run a database or whatever your stack needs as a system service — systemctl start postgresql works on images with systemd installed.
Was that not the case when you used container machines?
Comment by kdrag0n 5 hours ago
Comment by egernst 6 hours ago
If the guest image has /sbin/init, we use that.
We'd recommend using a base image for the guest that includes systemd. ie: https://github.com/apple/container/blob/main/docs/container-...
Comment by kxxx 5 hours ago
"Real Linux services for testing. Run a database or whatever your stack needs as a system service — systemctl start postgresql works on images with systemd installed."
Comment by kdrag0n 5 hours ago
Comment by kxxx 5 hours ago
Comment by CGamesPlay 5 hours ago
Wow, missed this when reviewing OrbStack. I assumed that you just used Containerization and therefore would have the same limitation.
Comment by saltamimi 5 hours ago
Comment by kdrag0n 5 hours ago
Comment by trueno 5 hours ago
Comment by TheTaytay 5 hours ago
I wanted to make its VM/machine our default secure agent sandbox, but I couldn’t figure out how to isolate this VM from the host properly. This thread prompted me to find the issue though, and I saw this was recently implemented! https://github.com/orbstack/orbstack/issues/169
Comment by kdrag0n 5 hours ago
Comment by jhancock 5 hours ago
Comment by thatxliner 5 hours ago
Comment by bjt12345 1 hour ago
Comment by blackqueeriroh 4 hours ago
Comment by vsgherzi 5 hours ago
Comment by kiproping 20 minutes ago
Comment by gempir 1 hour ago
But like having containers that need file watchers like vite dev server, or frankenphp in watch mode will overload OrbStack real quick since It seems to fallback to polling instead of listening to fs events.
So I'm stuck running vite dev servers and the like on the host.
Comment by emmelaich 5 hours ago
AFAICT it's pretty similar.
Comment by mpeg 4 hours ago
Comment by Ghoelian 1 hour ago
Comment by baq 1 hour ago
Personally I’d rather the company provisioned me MacBook hardware with Linux. Unless Fable or some other ai ports asahi properly to modern hardware I expect to retire before this is possible, orbstack is the next best thing, available today.
Comment by kxxx 6 hours ago
Comment by cpuguy83 5 hours ago
The Containerization framework is a library that sits as a layer on top of the virtualization framework. So each container is its own VM.
Machine is tooling above the containerization framework to run multiple things in a container in a vm.
Comment by jbverschoor 2 hours ago
Comment by aspeckt_112 13 minutes ago
I started using Colima a couple of years ago because I got bored of how bad Docker Desktop was and just started using the CLI / the "Services" tool window in whatever Jetbrains IDE I was using at the time anyway. I can't see myself moving away from it any time - having multiple profiles is an absolute winner of a feature for me there, but maybe the next time I set up a Mac from scratch I'll have a play with this.
Comment by WatchDog 6 hours ago
Edit: It's a VM per container. https://github.com/apple/container/blob/main/docs/technical-...
Comment by LaFolle 34 minutes ago
Comment by pmontra 31 minutes ago
By the way, is it headless or can it run a full Linux desktop? Use case: buy a Mac, uninistall whatever can be uninstalled, run the Linux VM as primary desktop forgetting MacOS and without going through Asahi and the incomplete hardware support.
Comment by iririririr 18 minutes ago
"bind mounts? I'm better without it"
Comment by tannhaeuser 47 minutes ago
Comment by jorisw 19 minutes ago
Comment by jaimehrubiks 6 hours ago
Comment by binsquare 2 hours ago
Comment by usernametaken29 6 hours ago
Comment by deathanatos 5 hours ago
That said, colima still has the expensive VM that upthread is mentioning.
Comment by TimTheTinker 5 hours ago
Comment by thejazzman 6 hours ago
I did an experiment migrating my Podman workload to Apple's container @ https://gist.github.com/jmonster/39e14585e107dbf990a90966c0f...
TL;DR reduces ram/storage usage; minimizes it's existence
Comment by deathanatos 5 hours ago
> Memory defaults to half of host memory
That's the most expensive part of the whole transaction, b/c AFAIK, RAM is then dedicated to the VM. It can be swapped out, I suppose, but that's not great.
Comment by MBCook 4 hours ago
Comment by nozzlegear 4 hours ago
Comment by lostlogin 6 hours ago
The pain of working around Docker Desktop is bad.
Comment by trollbridge 6 hours ago
Comment by shelled 22 minutes ago
Comment by rakel_rakel 2 hours ago
UX wise it looks kinda neat though!
Comment by k_bx 1 hour ago
I would really love if apple could give inexpensive way to run amd64 containers for situations when dev wants to use their own hardware. We've used LIMA for now, was too much of a hussle. But if there's a more native experience – would give it another try.
Comment by noobcoder 4 hours ago
I am trying it on but its brekaing on homebrew 1.0.0. The formula puts plugins at opt/container/libexec/container-plugins/ and the apiserver looks in libexec/container/plugins/
This can be solved through a symlink or smth
Comment by masklinn 1 hour ago
Are you sure about that? A few comments above a commenter states that they don’t run inits at all (because they ran alpine), multiple people replied that it works fine if you give it an image with an init, and they acknowledged their error.
Comment by katspaugh 2 hours ago
However, unlike Lima, an Apple Container is not a full VM, so you cannot SSH to it, or forward SSH-agent signatures into a machine.
So it's more of a devcontainer story, which is also a great use case. Nice to see Apple creating tooling around their VZ framework.
Edit: referential clarity.
Comment by binsquare 2 hours ago
It's a full vm
Comment by 0xbadcafebee 5 hours ago
Comment by llimllib 6 hours ago
In my testing (iirc) filesystem performance was not good enough to be usable with node/rust dev where lots of small files get stat-ed
update: what's new is the `container machine` subcommand. I went to test it out, but container failed to run at all for me: https://github.com/apple/container/issues/1681
Comment by kdrag0n 5 hours ago
Comment by dchest 1 hour ago
Comment by ahknight 4 hours ago
Comment by cromka 2 hours ago
There's some clever advertising in it for Linux, if Linux was advertising.
Comment by mkagenius 4 hours ago
I have made it a MCP so that it's easily discoverable by all the coding agents
Comment by sdevonoes 32 minutes ago
Comment by m1keil 19 minutes ago
Comment by pjmlp 2 hours ago
Which for many folks is good enough for what they are doing, thus the status quo of desktop platforms will hardly change for current form factors.
Comment by osigurdson 5 hours ago
Comment by marssaxman 5 hours ago
Comment by harrouet 1 hour ago
Comment by nottorp 1 minute ago
Comment by cogman10 5 hours ago
BSD actually has this already.
Comment by qalmakka 1 hour ago
Comment by twoodfin 4 hours ago
Comment by cogman10 4 hours ago
There's also simply the possibility of using linux software directly in macos without doing OS dependent changes to the software.
Comment by MBCook 3 hours ago
Running VMs is really really easy and low maintenance demand on Apple. And it’s guaranteed compatibility.
Wasn’t compatibility what really sunk WSL1?
Comment by skissane 3 hours ago
Yes, but a big part of the problem with WSL1 was the size of the conceptual gap between POSIX and Windows NT that WSL1 had to bridge. An “MSL1” would likely have fewer problems because the gap between macOS and Linux is smaller, given they are both POSIX
The other thing Apple could potentially do, is add Linux-compatible APIs to macOS. IBM wanted to support Kubernetes on their z/OS mainframe operating system, so they implemented on it a clone of Linux namespace APIs, e.g. unshare. Then we could have macOS nodes in a K8S cluster-which might actually be useful for some people, e.g. if you have a Jenkins CI farm, the Linux nodes can run on K8S, but currently macOS nodes (which you need if you are targeting iOS or macOS) can’t, they have to be bare metal or VMs.
More Linux-macOS source compatibility would also benefit macOS by making it less work to port software to it from Linux
Comment by qalmakka 1 hour ago
Comment by vachanmn123 3 hours ago
Comment by xd1936 3 hours ago
Comment by aurareturn 3 hours ago
Comment by kergonath 1 hour ago
Comment by Gigachad 3 hours ago
Comment by pjmlp 2 hours ago
Comment by asimovDev 2 hours ago
Comment by Gigachad 2 hours ago
The proton model has the benefit that bugs on linux can be fixed by Valve and the Wine community. While bugs in an official linux port can only be fixed by the game publisher which rarely happened. There also seems to be virtually no downsides to running a Windows game in Proton. These days I don't even bother checking the Wine DB or proton rating because unless the game is deliberately blocking linux via anti cheat, it will just work.
Comment by pjmlp 1 hour ago
Linux will stay forever a headless operating system great for embedded, server rooms and containers.
We have all limited time on Earth, and eventually Valve won't be around as it used to be, might even be acquired, sold, whatever, then what in regards to Linux gaming?
Comment by Gigachad 1 hour ago
Now with the Fex project, it might end up that running Windows games on linux on a modern ARM processor could be the best way to game going forward, especially for mobile platforms like the SteamDeck.
Comment by pjmlp 1 hour ago
Comment by bel8 1 hour ago
Proton is based on Wine which translates Windows instructions to Linux.
Besides there's already Wine for mac.
But I would love to be wrong here.
Comment by numbsafari 5 hours ago
Comment by RossBencina 5 hours ago
Comment by CGamesPlay 5 hours ago
Comment by jayd16 5 hours ago
Comment by Joyfield 4 hours ago
Comment by rickstanley 4 hours ago
Comment by opengears 1 hour ago
Comment by m132 5 hours ago
Comment by groundzeros2015 4 hours ago
Comment by al_borland 3 hours ago
Comment by TheDong 4 hours ago
Why would any serious developer use closed-source code they can't debug and modify? Especially for a production server?
It's the same reason no serious developers or hackers use macOS, like part of the point of being a developer is being able to dig into the code at any layer and debug and fix things.
Comment by bschwindHN 2 hours ago
I know I'm basically taking the bait, but I guess I've not been "seriously" developing stuff for the past decade or two, which is news to me!
Comment by m132 4 hours ago
That being said, my point isn't that Apple should absolutely focus on making a server OS again. It just saddens me how far behind macOS has fallen as they stopped caring about the fundamentals; back in the day, it would be Linux trailing behind macOS. Nowadays, you can't even have multiple routing tables on the latter, the firewall code was probably last updated in Snow Leopard, and what Apple happily shows off on WWDC is a wrapper around Linux. Something functionally equal can be cobbled up together by anyone sufficiently experienced in minutes, using just Bash, OpenSSH, and QEMU.
I really wish macOS would let me have a similar level of control over applications as Linux with namespaces, without me having to do all the heavy lifting.
Comment by alwillis 1 hour ago
Apple uses OpenBSD's Packet Filter [1]; I doubt multiple routing tables are a problem. Back in the Snow Leopard days, it was FreeBSD's IPFW, which is also no slouch.
Whatever a firewall can do, PF can do it.
You can also get a nice GUI for PF [2].
Comment by alwillis 1 hour ago
"Exploring Darwin and PureDarwin: The Open-Source Foundation of Apple's Operating Systems" - https://machaddr.substack.com/p/exploring-darwin-and-puredar...
Comment by pjmlp 2 hours ago
Comment by vehemenz 4 hours ago
Comment by bel8 3 hours ago
Even Microsoft gave up on Windows and just runs Linux most things except niche cases. Heck, even SQL Server which is expensive piece of machinery got ported to Linux and that's the default target now in their docs.
With that said, one can't deny Apple's success on the b2c side of things so it feels wrong to call their strategy a failure.
Comment by pjmlp 1 hour ago
Which is why so many projects get burned with their license choices.
Comment by gf000 47 minutes ago
Comment by pjmlp 32 minutes ago
Comment by tw04 4 hours ago
If they were to support darwin containers, what would be the point? Literally nobody would build to it, Linux won.
Comment by riffic 4 hours ago
because nobody does ci/cd against macOS or iOS apps right?
Comment by tw04 4 hours ago
There aren’t any app developers avoiding the Apple ecosystem because there aren’t Darwin containers. They don’t sell server hardware and by all accounts have no intention of ever reentering that space. So they’d spend a bunch of developer cycles to reduce their own revenue stream with no apparent upside beyond “goodwill” which they’ve never been overly concerned about.
Comment by m132 4 hours ago
If they're investing resources into it regardless, they might at least try making something that Docker for macOS and co. haven't solved the same exact way already. Something that, due to their almost unhealthy obsession with "system integrity", only they can realistically make. Like native containers.
Comment by tw04 4 hours ago
Comment by MBCook 3 hours ago
Which is a ton of ‘em.
Comment by pjmlp 1 hour ago
Comment by ahknight 4 hours ago
Comment by jzer0cool 2 hours ago
Comment by a1o 6 hours ago
Comment by cpach 2 hours ago
Comment by frizlab 6 hours ago
Comment by whycombinetor 2 hours ago
Comment by commandersaki 2 hours ago
Comment by beemboy 1 hour ago
Comment by ChrisArchitect 6 hours ago
Discover container machines
Comment by ShinyLeftPad 1 hour ago
Comment by konaraddi 1 hour ago
Comment by CSDude 3 hours ago
Comment by Cadwhisker 2 hours ago
Comment by commandersaki 6 hours ago
Comment by kdrag0n 6 hours ago
Blog post soon
Comment by blackqueeriroh 4 hours ago
Comment by calebm 4 hours ago
Comment by commandersaki 5 hours ago
* need a usb sdcard reader for macbook pro cause the builtin is not usb)
Comment by kdrag0n 4 hours ago
Comment by rgovostes 3 hours ago
Comment by egernst 5 hours ago
Comment by commandersaki 5 hours ago
Comment by sachinjoseph 5 hours ago
Comment by jbverschoor 2 hours ago
Comment by zekrioca 2 hours ago
Comment by itsneulook4 2 hours ago
Comment by namegulf 6 hours ago
Comment by MBCook 6 hours ago
Basically: they’ve moved on.
Comment by danhon 6 hours ago
Comment by joshuat 6 hours ago
Comment by JumpCrisscross 6 hours ago
Apple has never been about supporting legacy platforms with new features. And with over a quarter of revenue and two fifths of Apple's gross profits coming from services, one could argue the incentives run either way.
Comment by crote 4 hours ago
Enterprise ARM servers are still a niche product, and so are the ARM developer machines running Linux or Windows. Until this significantly changes, Apple will have to provide good x86 interop - or lose the developer market entirely.
Forcing people towards Apple silicon is of course an attractive approach when targeting the large portion of the market using their MacBooks as Facebook browsing machines, but (especially with the new MacBook Neo) what's going to happen when a large portion of the market for high-end MBPs disappears because it turned from the default no-brainer into a liability?
Comment by macintux 4 hours ago
I'm very, very skeptical of this analysis. Certainly "entirely" is hyperbole.
Comment by solarkraft 1 hour ago
Comment by ForOldHack 5 hours ago
Comment by weikju 4 hours ago
Comment by teaearlgraycold 6 hours ago
Comment by imglorp 4 hours ago
Daily driver is a 6yo, 32Mb mbp and it might not scream like an M5 or have the miraculous power draw of an M5, it gets my job done.
One nice thing is x86 containers run natively: I run most of my $work landscape which is 40 or 50 k8s pods on top of Kind, which is itself a plain container. That mirrors my prod. That plus slack, zoom, ff with scores of tabs, etc. all while building rust and playing music.
Comment by MBCook 3 hours ago
Comment by teaearlgraycold 2 hours ago
Comment by ncr100 5 hours ago
Comment by Brian_K_White 6 hours ago
Comment by tonymet 2 hours ago
Comment by phplovesong 2 hours ago
I usually run like a db, redis, maybe something like rabbitmq/zeromq and have a app that uses these services (makefile/docker-compose).
I would love to switch if this in fact is a lightweight replacement.
Comment by masklinn 46 minutes ago
Comment by t1234s 5 hours ago
Comment by gigatexal 4 hours ago
Comment by michaelsbradley 4 hours ago
Comment by blackqueeriroh 4 hours ago
Comment by MBCook 3 hours ago
It’s the only legal way to do so, due to the software license on MacOS.
Comment by riffic 5 hours ago
Comment by m463 6 hours ago
you can now run linux containers on your mac
... but it could be better.
what about (totally contrived):
FROM apple/macos:10.11.6
RUN xcodebuild -project myapp.xcodeproj -scheme MyScheme -configuration ReleaseComment by webXL 6 hours ago
Comment by m463 6 hours ago
ENV XCODE_FRONTEND=unattended
ENV XCODE_LICENSES=accept,firstborn,applepay,appleid=sjobs@me.comComment by trollbridge 6 hours ago
services:
macos:
image: dockurr/macos
container_name: macos
environment:
VERSION: "15"
(And indecently slow.)Comment by windowliker 6 hours ago
Comment by m463 4 hours ago
I'm saying the older version of macos could build/run INSIDE the container
just like on a ubuntu 24.04 system you can do:
FROM ubuntu:16.04
or docker run ubuntu:16.04
and though I haven't tried it, I believe docker can do arm in x86 using an emulator (like rosetta)Comment by MBCook 3 hours ago
So it seems like in theory that should be doable if someone just made the container images right?
Comment by jadar 6 hours ago
Comment by lzwjava 2 hours ago
Comment by sourcegrift 6 hours ago
Comment by al_borland 5 hours ago
Framework is trying to close that gap with their new release, but we’ll have to see how it is once people get their hands on it. I think it also comes at a price premium. There is always the Thinkpad route, but Lenovo burned just about every bridge with me a decade ago with things like Superfish. Where is the premium Linux laptop OEM that people can trust? Last I heard System76 was just rebranding Clevo hardware. What are people using? Dell? HP?
Comment by hollerith 6 hours ago
Comment by pixelatedindex 6 hours ago
Comment by armadyl 5 hours ago
https://privsec.dev/posts/linux/linux-insecurities/
https://madaidans-insecurities.github.io/linux.html
I also commented here on Linux phones, the same can apply to Linux as a desktop OS: https://news.ycombinator.com/item?id=46997397
Also on top of that Linux/Windows laptops also lack the hardware-backed security that Macs and to an extent some Chromebooks have.
Comment by JumpCrisscross 6 hours ago
Comment by armadyl 5 hours ago
No amount of Linux hardening will get a system even close to an M-chip Mac. Software insecurities aside, desktop Linux OS systems have almost none of the hardware-backed security benefits that Macs do.
Comment by TimTheTinker 5 hours ago
Comment by armadyl 5 hours ago
Comment by JumpCrisscross 5 hours ago
Comment by armadyl 4 hours ago
I don't think Apple is particularly any more secure against the US government than Intel is with supply chain vulnerabilities but I have nothing to back that up with aside from vibes.
Comment by dvhh 4 hours ago
Comment by xiaodai 4 hours ago
Comment by jwlake 4 hours ago
Comment by itsneulook4 2 hours ago
Comment by khazhoux 1 hour ago
Comment by Barbing 6 hours ago
This is a step in the right direction but requires any given developer’s buy-in first, right?