Help me ! I'm going to make a mistake... migrate to GNU/Linux ...

Hello,

I have been using FreeBSD for my home-box server for years now; I started with FreeBSD 9.x, something like this .
I have always been very satisfied with the ecosystem, the community, the overall quality of the distribution, and its design.
I like the jails, I like packet filtering, I like the robustness of the design and the product. I'm really a FreeBSD enthousiast !
In fact, I have always tried to evangelize and promote it in various ways on forums and my blog.

Except that for the past few months, I have been facing a problem when I want to deploy new software that I find on GitHub...

Most of the time, they are intended to be installed with a “dockerfile”... and that's it !

In the best case scenario, there is documentation for building for dev peoples with npm/cargo... but most of the time, manual compilation are painfull and fails because a library does not recognize FreeBSD...
Some softwares are very easy to build (often those created with Golang or Rust), but as soon as there is a little javascript npm frontend or backend , it quickly becomes very complicated. Especially for modern webapp.

It becomes really, really frustrating to find a new software that I like and would like to test, but that I know I'm going to have to struggle with, try to translate the docker file, commit to the repo, and fight to justify why this or that library doesn't compile with FreeBSD... I don't have the energy or time for that anymore...

So I know that FreeBSD isn't the problem; the problem is that developers think that dockerfile is the new standard for deploying applications especially for javascript apps !
But reality is what it is.

I tried playing around with Podman, but it's really not production-ready, and you have to do a lot of tinkering to get software other than a "simple Python image" to work.

One solution might be to boot a VM with Bhyve based on Alpine and run Docker in that VM
But that would require me to use multiple technologies, review my backup policy, run tests, and so on. And my ressources on my main box are limitated (N100 + 16G or Ram)
This will takes me further away from what I'm trying to do: have a simple, consistent system consisting exclusively of jails easy to manage and restore.

This is why I'm considering to migrate my small n100 box to Rocky or Debian with docker only .... 😢
 
I've done a little research and here are my two cents.

1) You are facing a common conundrum.

2) The most practical solution seems to be, as you yourself point out:
boot a VM with Bhyve based on Alpine and run Docker in that VM

3) To simplify your backups, you may place the VM's disk image in a dedicated dataset and snapshot/replicate it alongside the jail datasets. You probably already know this. I'm assuming you are using ZFS.

4) Don't leave FreeBSD. You know you'll regret it in the long term.

5) To make some "sacrifices" in order to use a technology as cool as FreeBSD is worth it. I have three monitors, one is connected to a different GPU. FreeBSD can't handle this that I know of. Solution: I'm using two monitors since I switched to FreeBSD and I'm happier than ever.
 
My 2c: use tools that enable your success.

I'm using FreeBSD since 4.9, migrated from Slackware. But I'm not forcing FreeBSD on setups where it's clearly creating issues that a) cannot be solved b) require lots of my time when there is cleaner solution.

As you mentioned VM is an option (there are other choices next to bhyve too). From what you've described I think it's a good way to test your setup and see that in action.

So I know that FreeBSD isn't the problem; the problem is that developers think that dockerfile is the new standard for deploying applications especially for javascript apps !
But reality is what it is.
Well, developers of said application are aiming for Linux and it's convenient way of distributing application to end users. It's not ideal solution for everything on Linux either but certainly has a place to shine.
 
I've stopped fighting, a rocky VM in Bhyve solved my problems, but I confess I am not a big docker user, not a big fan, I like to try things and docker is probably the easiest way to do that.

For me jails are good for FreeBSD stuff mostly or even if a Linux binary is available, but if a compilation is required and needs too much tinkering, then jails loose their purpose (but it could be a me problem though).

You might also give a try to Illumos with their LX zones, combining Unix spirit and Linux "jails"/zones is a nice feeling, easy to setup and it works pretty well, the downside for me is the very small community, docs that relies mostly on Oracle Solaris10 and the low development which leads you to consider it as a good or bad choice for a long term solution.
 
Back
Top