For me, jails aren’t only technically better, but also have better ergonomics. With Docker:
- I always end up running out of disk space, because of Docker’s love of immutable layers for everything — my jails just live in a normal directory in the filesystem, no need to overthink it;
- I have no idea how to restrict /dev in Docker containers — I’m sure you can, but it’s a mystery to me;
- copying/moving files between host and container requires setting up volumes/ssh/whatever special ceremony; copying/moving files to/from jails is trivial, it’s the same as copying/moving files between any other directories;
- updating jails is easy; I use pkg and freebsd-update, just like with a normal system update, no need to update the host system one way, and the jails another way, like with Docker;
- jails don’t mess with my firewall rules, unlike Docker.
Overall, jails give me a much more cohesive experience.
I agree wholeheartedly. I like jails a lot (and jails+ZFS even more) and I'm not a fan of Docker at all. But the entire planet adopted it and isn't even aware jails exist.
You won't find a premade pihole jail, a downloadable HomeAssistant jail, etc. That's what I mean with ecosystem. Being the better solution is surprisingly unimportant when nobody knows you exist.
Comments
For me, jails aren’t only technically better, but also have better ergonomics. With Docker:
- I always end up running out of disk space, because of Docker’s love of immutable layers for everything — my jails just live in a normal directory in the filesystem, no need to overthink it;
- I have no idea how to restrict /dev in Docker containers — I’m sure you can, but it’s a mystery to me;
- copying/moving files between host and container requires setting up volumes/ssh/whatever special ceremony; copying/moving files to/from jails is trivial, it’s the same as copying/moving files between any other directories;
- updating jails is easy; I use pkg and freebsd-update, just like with a normal system update, no need to update the host system one way, and the jails another way, like with Docker;
- jails don’t mess with my firewall rules, unlike Docker.
Overall, jails give me a much more cohesive experience.
I agree wholeheartedly. I like jails a lot (and jails+ZFS even more) and I'm not a fan of Docker at all. But the entire planet adopted it and isn't even aware jails exist.
You won't find a premade pihole jail, a downloadable HomeAssistant jail, etc. That's what I mean with ecosystem. Being the better solution is surprisingly unimportant when nobody knows you exist.