News for hackers. Stuff that matters.
Re:macOS Containers v0.0.1 by znpy on Tuesday September 26, 2023 @04:30AM (#37656185)
So essentially a chroot with a bit of make-up and a lot of marketing?

Except for bind mounts (not even overlayfs...) there isn't much interesting.

> - Host-network mode only

Yeah expect a lot of things to break in subtle ways... most containers are developed kinda expecting you have your own network namespace (and that no one else is using ports)

Re:macOS Containers v0.0.1 by lloeki on Tuesday September 26, 2023 @04:48AM (#37656323)
> most containers are developed

Most Linux (and Windows) containers. Since these are macOS containers there are no containers developed yet.

Re:macOS Containers v0.0.1 by slonopotamus on Tuesday September 26, 2023 @05:34AM (#37656720)
Original author here.

> So essentially a chroot with a bit of make-up

Well.

1. It is not trivial to properly set up a chroot on macOS. If you try to find a working guide/tool that works with modern macOS, I doubt you'll find anything (at least, I failed, even though tried very hard) 2. I believe that ability to package stuff into a Docker image distributable via already existing infrastructure and compatible with already existing tools maybe "a bit of make-up", but it is an important makeup. 3. Kubernetes recently got HostProcesses for Windows: https://kubernetes.io/blog/2022/12/13/windows-host-process-c.... They are even less isolated from host than chroot and still, people find them useful for certain scenarios.

> and a lot of marketing?

Thanks for "a lot of marketing", that made me chuckle. My own submission got buried yesterday with humble 8 points: https://news.ycombinator.com/item?id=37640688

Re:macOS Containers v0.0.1 by e12e on Tuesday September 26, 2023 @06:52AM (#37657390)
Great effort. I get why you call it container - but sounds more like jail or cheroot would give more appropriate expectations; like "tooling to build and run Darwin containers in a macOS chroot"?
Re:macOS Containers v0.0.1 by slonopotamus on Tuesday September 26, 2023 @07:30AM (#37657719)
I didn't want to use "jail" term because it is mostly unheard of outside of FreeBSD.

Container definition is very stretched nowadays. Look at Windows HostProcesses in Kubernetes [1]. They don't have neither process, network nor device isolation from the host.

I also plan to try macOS sandbox-exec tool, which should offer additional isolation from the host.

[1]: https://kubernetes.io/blog/2022/12/13/windows-host-process-c...

Re:macOS Containers v0.0.1 by xenadu02 on Tuesday September 26, 2023 @02:51PM (#37664044)
If the parent process of the container here changes its bootstrap port to itself or disinherits it then it could also create an isolated mach namespace, restricting access to mach/XPC services.