Hacker News new | past | comments | ask | show | jobs | submit login
Runj: Experimental, proof-of-concept OCI-compatible runtime for FreeBSD jails (github.com/samuelkarp)
192 points by ingve on March 16, 2021 | hide | past | favorite | 13 comments



With enough love it sounds like eventually Kubernetes could in theory also deploy applications running in BSD Jails on BSD. Great! Hope it gets enough love. I wonder if this is developed in an official capacity under the Amazon brand or it's a personal project. If the former, would be interesting to see what Amazon's interest is in this.


Ed Schouten presented "Running CloudABI applications on a FreeBSD based Kubernetes cluster" at EuroBSDCon 2017. Some really cool ideas, it's unfortunate that it didn't go further. https://www.youtube.com/watch?v=akLa9L5O0NY


Personal project:

> This is a personal project, not backed by the author's employer.


I wondered if anything like this could be done on macOS too, but a bit of searching revealed, macOS has no jails, only chroot (and App Sandbox), and no Linux compatibility layer. So it's kind of a non-starter.


GNU Guix also supports containers (guix environment --containers) in addition to docker export. But they are not, as I am aware, OCI-compatable. Would love to see a similar effort in that space.


How is the Linux sub system/binary support for freeBSD these days? In theory this could be made to run Linux containers on the bsd kernel?


You can find instructions how to create Ubuntu Jails inside FreeBSD.

There was an experimental Docker port for FreeBSD some years ago and it was actually working. I think it is mentioned here https://wiki.freebsd.org/Docker. However, it wasn't extremely useful as it didn't reach maturity, and because FreeBSD already had Jails. Which we were already using in production for the past ~15 years.


Linux containers make use of a kernel API which freebsd doesn't implement. However, you could run linux apps under a regular linux userspace inside of a freebsd jail.


Right, you couldn't run docker/dockerd, but you could run some docker images, probably? They're just filesystems with regular Linux binaries in them.

Ed: for example, AFAIK there's no native build of Microsoft sql server for freeBSD, but there's a release for Linux, and a docker (oci) image:

https://hub.docker.com/_/microsoft-mssql-server

So, assuming runj could fetch from docker hub, and interpret the images, you might in theory just:

runj run mcr.microsoft.com/mssql/server

(I'm not sure about the status of init vs oci - I know docker defaults to/uses tini these days?).


FreeBSD implements a nice Linux compatibility shim. It might be worth asking if the cost to implement the kernel API needed for this, is too high, or can be GSoC or something.


Whats the path from something syntactically functionally like Dockerfile, to an OCI compliant outcome runj would work with?

To me, Dockerfile and the image repo is the killer-app side of this.

Conversion scripts, re-compilers would be cool. Lots of things won't work, because of assumptions about what POSIX or like spec means inside the run state, but it would be a great first move, and over time people would move to more portable OCI outcomes hopefully.


Would be great to see it evolve into something greater. FreeBSD need something like that, despite what a lot of ppl, that i encountered, love to say.


This is really exciting.

As is, jails feel a lot more like base system + fragile setup scripts.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: