5 ms·
> I'd really like to see jails/BSD containers on macOS. That's not how jails work.
by nix23 4y ago
> I'd really like to see jails/BSD containers on macOS.
That's not how jails work.
- simonh 4y agoThey’re just asking for an equivalent feature.
- musicale 4y agoIndeed. Also note post I was responding to. Note that macOS' Xnu kernel supports BSD system calls (e.g. chroot(2)), and macOS includes a BSD userland which I think is largely derived from FreeBSD. In principle it should be possible (though non-trivial) to add support for the relevant BSD system calls such as jail(2) and jail_attach(2), as well as the appropriate sysctls to enable BSD jails to actually run natively on macOS. (For comparison, Linux implements containers primarily via the unshare(2) and setns(2) system calls, as well as /proc and cgroups. It's more of an a la carte approach since there are a number of independent namespaces supported by unshare(2). And bind mounts, overlayfs and the older unionfs, and the venerable chroot(2). Etc.) To me it seems that supporting the BSD system calls and infrastructure would be a reasonable evolution of macOS' BSD subsystem. Moreover, as you note, macOS could add an Apple-specific native container feature or framework. Consider that macOS already has a lower-level Hypervisor framework as well as a higher-level Virtualization framework which provided an easy to use API for creating VMs. They could implement their own Container framework or perhaps adapt or extend the existing Virtualization framework.