I know… I know.

But just out of curiosity about how it works. I remember back in some dark days of still dual booting getting curious about wsl1 and being fairly impressed. At the time I had a heavy gaming laptop and a Surface 3 I would take to class to keep my STEM student physic rather than going body builder moving an alienware around.

Having wsl was a neat tool to get started on some homework assignments before I got home to the real computer. Given that Windows ARM has been kind of a let down (or perhaps Apple just set too high a bar) I am curious about how this niche has turned out.

  • moonpiedumplings
    link
    fedilink
    arrow-up
    7
    ·
    2 days ago

    I always wonder how Docker works on macOS with a more UNIX-style kernel than Linux

    It doesn’t. Macos also uses a virtual machine for docker.

    but is it really that hard to do Docker/OCI out of Linux?

    Yes. The runtimes containers use are dependent on cgroups, seccomp, namespaces, and a few other linux kernel specific features.

    You could implement a wine like project to run the linux binaries that containers contain, and then run some sandboxing to make it be a proper container, but no virtual machines or virtual machine container runtimes* are easier.

    Linuxulator, a freebsd project does the above.

    https://people.freebsd.org/~dch/posts/2024-12-04-freebsd-containers/

    *these are much lighter than a normal vm, I’ll need to check if this is what macos does. I know for a fact docker on windows uses a full Linux vm though.

    • Cousin Mose@lemmy.hogru.ch
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      2 days ago

      Actually that’s a good point that I’ve completely forgotten. Docker uses the modern macOS APIs for virtualization these days, and uses Rosetta2 for amd64 containers.

      Edit: Damn you’ve got me excited about FreeBSD again. I’m a much bigger fan of FreeBSD on bare metal but do love Docker and related Linux goodness!

      • LeFantome
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        14 hours ago

        FreeBSD is supporting OCI containers natively. If the app in your container can run on Linuxulator, it will run on FreeBSD (natively on the FreeBSD kernel).

        They want it to be able to host Kubernetes on FreeBSD.