Hacker News new | ask | show | jobs
by whizzter 98 days ago
My current home server passed 10 years in the autnum, but I've been running FreeBSD on servers since around 2000.

The main gripe is probably Docker and/or software depending on Linux-isms that can't be run natively without resorting to bhyve or smth alike that.

3 comments

You could just use podman.
Theoretically yes, however still limited by how well the FreeBSD Linux layer handles syscalls. A year or so back I tried running .NET (just binaries, not via a container) since the port wasn't as far along as today and it crashed due to what I suspect was slight differences in signal handling defaults.

And this is part of the situation that's going to get worse, io_uring will become more popular in language runtimes and iirc it's not trivial to emulate via existing FreeBSD mechanisms (kqueue).

Iirc Mac docker uses xhyve (bhyve port/inspired) to run containers via Linux emulation, MS went for pv-Linux for WSL2, while FreeBSD has been "good enough" so far.

But I think that for containers it's either time to shape up Linux emulation well (It's ironic that WSL1 ironed out their worst quirks just as WSL2 was introduced, although that was without io_uring) or just add an option for Podman to have a minimal pv-Linux kernel via bhyve to get better compatibility.

Indeed, ideally we could get docker on FreeBSD using the same approach as is used on macOS — automatically run (one or more) Linux VMs under bhyve.

I wonder if FreeBSD ought to consider a WSL2-style approach to Linux binary compatibility, too.

Keeping the Linux syscall compatibility layer up-to-date has always been a resource problem, especially when syscalls depend on large, complex Linux kernel subsystems that just don’t map cleanly to FreeBSD kernel facilities.

I’m confused because can already do this on MacOS, Windows and Linux

Does `podman machine init` not work in FreeBSD? In those other platforms it will spin a small Linux VM to run containers on.

I have not thus far had anything to do with containers, so docker is unknown territory for me.

I run audiobookshelf in a Debian VM via bhyve, but I was gonna run a Debian VM anyway.

Exactly the reason why I switched from FreeBSD to Debian, 25 years ago
The difference compared to a quarter of a century ago is that hardware virtualization is an ubiquitous thing now and that machines go so much faster that you don't even realize you're running in a VM anymore: it's pretty much transparent. I run Docker on my Linux servers inside a VM. There's no way I let Docker touch the bare metal, not with a ten foot pole.

If people want or need to run Docker on FreeBSD, they can run a Linux VM under bhyve.