| First of all, macos bundles are nowhere near as flexible or "powerful" as OCI containers though. Even if you add all of docker features and knobs onto macos bundles, how do you think that's implemented? through a darwin syscall `run_bundle()`? as for the list of points: 1. sure, though an OCI image can be exported to a flat bundle too if you don't care about layer efficiency 2. that's one of the things you don't want with docker containers. Nothing is stopping you from `-v /usr/lib:/usr/lib -v /bin:/bin` but you don't want that. Arguments about how much Apple or Windows puts into backward compatibility are moot once a minor breaking change is pushed to these machines without you knowing about it or if you want to explicitly have a different version of a platform library or dependency for one particular container 3. OCI registries are decentralized. The reliance on docker hub is just a convenance. It's like git is decentralized, the fact that everyone relies on GitHub is their own issue. If a DmgHub came up tomorrow where everyone uploads their dmg to it, and it became the socially acceptable place to always fetch dmgs from, did bundles become suddenly centralized and we need a different OS primitive to be decentralized again? the reason they are decentralized today is because no one cared to centralize them (except Apple's App Store of course) 4. You can do that with OCI images too 5. Nope. What's the bundle's equivalent of seccomp profiles? user-mode kernel/runsc? kata (VT-x or AMD-V) isolation? 6. That's a downside not an upside. You can put all your OCI files under /app, and mount the rest of the host mount namespace too. No one does that because they don't want to, not because it's not possible. |
1. You can export images, but why is this complexity necessary in the first place? Efficiency does matter.
2. Bundles support different versions of frameworks than what comes with the system, that's not a problem. However it isn't mandatory like it is with containers. And yes, obviously you can make a container that isn't contained, but they aren't meant to be used like that - you are meant to always ship a complete userspace with the program, even if it's nothing more than a tiny script.
3. They aren't decentralized in any meaningful way. Blackhole Docker Hub on your machine and see how far you get. There's no equivalent problem for bundles.
4. Docker containers aren't natively files or directories, which is why you have to use separate commands like "docker image ls" instead of the real ls. You can turn them into files but then they aren't natively usable in that state until you import them.
5. Look into Apple's entitlements, code signing and TCC system. It's much more advanced than anything Linux has.
6. We'll just have to disagree on that. Namespacing is a crude hack that introduces many new kinds of bugs and configuration difficulties. Compared to just running the thing, it's worse.