8 ms·
It's impossible to have "native" support for Linux containers on macOS, since the technology inherently relies on Linux kernel features. So I'm guessing this is
by paxys 1y ago
It's impossible to have "native" support for Linux containers on macOS, since the technology inherently relies on Linux kernel features. So I'm guessing this is Apple rolling out their own Linux virtualization layer (same as WSL). Probably still an improvement over the current mess, but if they just support LXC and not Docker then most devs will still need to install Docker Desktop like they do today.
- jzelinskie 1y agoThe screenshot in TFA pretty clearly shows docker-like workflows pulling images, showing tags and digests and running what looks to be the official Docker library version of Postgres.
- paxys 1y agoEvery container system is "docker-like". Some (like Podman) even have a drop-in replacement for the Docker CLI. Ultimately there are always subtle differences which make swapping between Docker <> Podman <> LXC or whatever else impossible without introducing messy bugs in your workflow, so you need to pick one and stick to it.
- deleted 1y ago[deleted]
- tough 1y agohttps://opencontainers.org/ https://opencontainers.org/
- cogman10 1y agoIf you've not tried it recently, I suggest give the latest version of podman another shot. I'm currently using it over docker and a lot of the compatibility problems are gone. They've put in massive efforts into compatibility including docker compose support.
- darkwater 1y agoYeah, from a quick glance the options are 1:1 mapped so an alias docker='container' Should work, at least for basic and common operations
- tensor 1y agoApple has had a native hypervisor for some time now. This is probably a baked in clone of something like https://mac.getutm.app/ https://mac.getutm.app/ which provides the stuff on top of the hypervisor.
- watermelon0 1y agoUsing a hypervisor means just running a Linux VM, like WSL2 does on Windows. There is nothing native about it. Native Linux (and Docker) support would be something like WSL1, where Windows kernel implemented Linux syscalls.
- mdaniel 1y agoSurely if Windows kernel can be taught to respond to those syscalls, XNU can be taught it even easier. But, AIUI the Windows kernel already had a concept of "personalities" from back when they were trying to integrate OS/2 so that zero-to-one for XNU could be a huge lift, not the syscalls part specifically
- literalAardvark 1y agoExactly. So it wouldn't necessarily be easier. NT is almost a microkernel.
- 9dev 1y agoYep. People consistently underestimate the great piece of technology NT is, it really was ahead of its time. And a shame what Microsoft is doing with it now.
- okanat 1y agoWas it ahead? I am not sure. There was lots of research on microkernels at the time and NT was a good compromise between a mono and a microkernel. It was an engineering product of its age. A considerably good one. It is still the best popular kernel today. Not because it is the best possible with today's resouces but because nobody else cares about core OS design anymore. I think it is the Unix side that decided to burry their heads into sand. We got Linux. It is free (of charge or licensing). It supported files, basic drivers and sockets. It got commercial support for servers. It was all Silicon Valley needed for startups. Anything else is a cost. So nobody cared. Most of the open source microkernel research slowly died after Linux. There is still some with L4 family. Now we are overengineering our stacks to get closer to microkernel capabilities that Linux lacks using containers. I don't want to say it is ripe for disruption becuse it is hard and again nobody cares (except some network and security equipment but that's a tiny fraction).
- bandoti 1y agoWhat about macOS being derived from BSD? Isn’t that where containers came from: BSD jails? I know the container ecosystem largely targets Linux just curious what people’s thoughts are on that.
- hangonhn 1y agoConceptually similar but different implementations. Containers uses cgroups in Linux and there is also file system and network virtualization as well. It's not impossible but it would require quite a bit of work.
- McAlpine5892 1y agoBSD jails are architected wholly differently from what something like Docker provides. Jails are first-class citizens that are baked deep into the system. A tool like Docker relies using multiple Linux features/tools to assemble/create isolation. Additionally, iirc, the logic for FreeBSD jails never made it into the Darwin kernel. Someone correct me please.
- dboreham 1y ago> what something like Docker provides Docker isn't providing any of the underlying functionality. BSD jails and Linux cgroups etc aren't fundamentally different things.
- nyrikki 1y agoJails were explicitly designed for security, cgroups were more generalized as more about resource control, and leverages namespaces, capabilities, apparmor/SELinux to accomplish what they do. > Jails create a safe environment independent from the rest of the system. Processes created in this environment cannot access files or resources outside of it.[1] While you can accomplish similar tasks, they are not equivalent. Assume Linux containers are jails, and you will have security problems. And on the flip side, k8s pods share UTM,IPC, Network namespaces, yet have independent PID and FS namespaces. Depending on your use case they may be roughly equivalent, but they are fundamentally different approaches. [1] https://freebsdfoundation.org/freebsd-project/resources/introduction-to-freebsd-jails/ https://freebsdfoundation.org/freebsd-project/resources/intr...
- LoganDark 1y agoI wonder if User-Mode Linux could be ported to macOS...
- wmf 1y agoIt would probably be slower than just running a VM.
- msgodel 1y agoIf they implemented the Linux syscall interface in their kernel they absolutely could.
- vips7L 1y agoAren't the syscalls a constant moving target? Didn't even Microsoft fail at keeping up with them in WSL?
- asabil 1y agoNot Linux syscalls, they are a stable interface as far as the Linux kernel is concerned.
- koito17 1y agoLinux is exceptional in that it has stable syscall numbers and guarantees stability. This is largely why statically linked binaries (and containers) "just work" on Linux, meanwhile Windows and Mac OS inevitably break things with an OS update. Microsoft frequently tweaks syscall numbers, and they make it clear that developers must access functions through e.g. NTDLL. Mac OS at least has public source files used to generate syscall.h, but they do break things, and there was a recent incident where Go programs all broke after a major OS update. Now Go uses libSystem (and dynamic linking)[2]. [1] https://j00ru.vexillium.org/syscalls/nt/64/ https://j00ru.vexillium.org/syscalls/nt/64/ [2] https://go.dev/doc/go1.11#runtime https://go.dev/doc/go1.11#runtime
- my123 1y agoarm64 macOS doesn't even allow statically linked binaries at all. on the windows side, syscall ABI became stable since Server 2022 to run mismatched container releases
- PhilipRoman 1y agoThey're not really a moving target (since some distros ship ancient kernels, most components will handle lack of new syscalls gracefully), but the surface is still pretty big. A single ioctl() or write() syscall could do a billion different things and a lot of software depends on small bits of this functionality, meaning you gotta implement 99% of it to get everything working.
- enceladus06 1y agoWSL throughput is not enough for file intensive operations. It is much easier and straightforward to just delete windows and use Linux.
- okanat 1y agoUsing the Linux filesystem has almost no performance penalty under WSL2 since it is a VM. Docker Desktop automatically mounts the correct filesystem. Crossing the OS boundary for Windows files has some overhead of course but that's not the usecase WSL2 is optimized for. With WSL2 you get the best of both worlds. A system with perfect driver and application support and a Linux-native environment. Hybrid GPUs, webcams, lap sensors etc. all work without any configuration effort. You get good battery life. You can run Autodesk or Photoshop but at the same time you can run Linux apps with almost no performance loss.
- thrawa8387336 1y agoFWIW I get better battery life with ubuntu.
- elektrontamer 1y agoHow? What's your laptop brand and model? I've never had better battery life with any machine using ubuntu.
- okanat 1y agoAre you comparing against the default vendor image that's filled with adware or a clean Windows install with only drivers? There is a significant power use difference and the latter case has always been more power efficient for me compared to the Linux setup. Powering down Nvidia GPU has never fully worked with Linux for me.
- sarlalian 1y agoUnless you need to have a working video or audio config as well.
- pjmlp 1y agoWSL 1.0, given that WSL 2.0 is regular Linux VM running on HYPER-V.
- DidYaWipe 1y agoI installed Orbstack without Docker Desktop.
- sequence7 1y agoWSL doesn't have a virtualization layer, WSL1 did have but it wasn't a feasible approach so WSL2 is basically running VMs with the Hyper-V hypervisor. Apple looks like it's skipped the failed WSL1 and gone straight for the more successful WSL2 approach.