Hacker News new | ask | show | jobs
by riffic 1601 days ago
I know people doing docker dev are generally targeting a Linux of some sort, but why the heck doesn't the macOS kernel support native containerization?

Come on Apple. Microsoft can do it.

edit: this seems like a new development since my last whine/complaint on this topic:

https://macoscontainers.org/

8 comments

I don’t think it’s lack of support so much as lack of demand. MacOS containers sound like a solution looking for a problem.
Although just today I was having some Windows containers hiccups, I am looking forward to the day that Microsoft doesn't require installing a third party solution (Docker) to use them.
And for anyone looking to migrate away from docker desktop on Windows for use with VSCode I wrote this guide: https://gist.github.com/tdamsma/06cafea175d6784aea7b3634bb94...
It doesn't help for Windows containers though.
https://github.com/woachk/dockerinstall for a very minimal install, stuff other than that is unneeded for Windows containers.
Thanks, that is more what I was looking for.
Install a WSL machine. Install docker (or containerd, or whatever) in it. Install docker-cli on your host, then use `docker context` to use the server in WSL. 20min of effort if your Google fu is good.

If you need something like the docker desktop UI, check out portainer.

Thanks it doesn't help for Windows containers, that was my point.
> why the heck doesn't the macOS kernel support native containerization

It doesn't seem like a huge leap from sandboxing to containerization.

They also might consider supporting BSD-style jails.

Indeed, with windows' linux subsystem I have to say working from M$ sounds reasonable, maybe even better than dealing with Mac OS X half-baked package managers and subpar docker experience.

It used to be that Windows had a better UX than OS X (imho at least), but nowadays they're equally crap and they can't compare with what's available on linux.

With two machines, I'd still pick Windows for gaming dev and linux for everything else.

With three machines, I'd add a screen-less mac mini to do iOS related builds.

That URL got me excited, but didn't seem to be a lot of progress on it in the last 6 months or s.
I have used the native launch agent system in macos to do what some people use docker containers for.
Do you have this written up anyplace sharable?
No, but basically this would apply to like little services that might run on docker locally on my mac. Say you have a Dockerfile that uses pip to install some stuff and run a python script. There are a few tools on github I use that are configured like this. To run it without docker, I would write up a simple launch agent plist file that calls up another script that just initializes a conda environment with the dependencies and runs the python. this might not be applicable to all docker use cases, though, but it works well enough for me.
Because most people want to run Linux containers (to get the same environment as their servers)
> why the heck doesn't the macOS kernel support native containerization?

Because Apple has no plans of growing their server OS marketshare. I know there are benefits of using namespaces (containers) in the desktop market, but they don't sell iMacs/MBPs. Exterior design and heavy marketing is their sales strategy.

I never understood this, because surely some huge percentage of developers use Macs. Enterprises buy stacks of them nonstop. Just making that group happy would get you the reputation of being a developers machine, for serious computer people, which could translate into laymen purchases too.
Would developers really be happy with containers running macOS inside? Production is running Linux, so they need two sets of images and their local image will be different from the one running in production.
I'm really not sure what comment you're replying to but Mac developers write code that runs on linux primarily using Docker and "VMs" that run linux on docker. Like; probably 75% of the devs on the west coast do this.
Mac developers run code that runs on iOS, iPadOS, watchOS and macOS, that is why they are Mac developers.

Otherwise they are just UNIX developers that don't care which POSIX platform they are actually using.

Yeah, I meant developers who prefer to use macs.
iOS, iPadOS, watchOS and macOS applications aren't made out of thin air, they also need developers.
Also creating their own SoC that outperforms others in the space.
"Exterior design and heavy marketing is their sales strategy" this is old, boring and not even true.
containerization won't just help in the server-space. It has use-cases in app development like CI.
Apple would like you to move to XCode Cloud[0] in the future, running CI pipelines on your local device is soooo last-century.

[0] https://developer.apple.com/xcode-cloud/