News for hackers. Stuff that matters.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by djsumdog on Monday November 02, 2020 @03:01PM (#24972495)
I wish there was a usable Docker Engine API implementation that could run containers in jails using zfs for image layering. There is a Docker for FreeBSD port, but last time I checked, it was super old. Having Docker as a first class citizen on FreeBSD would make it really incredibly as a server OS.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by accountofme on Monday November 02, 2020 @08:25PM (#24975405)
Having played with SmartOS containers using linux compatibility (not docker). I will say this: Use native containers for that OS. The slight differences that you will find, will drive you up the wall. They will be esoteric and happen at the worst time.

And i should say I love SmartOS, it is a really cool bit of tech... I just love simplicity more, and a compatibility layer is never simple.

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by cchdmdldkdjfdk on Tuesday November 03, 2020 @12:18AM (#24976595)
https://en.wikipedia.org/wiki/SmartOS

If linux comes out with tools remotely approaching the quality of either freebsd or solaris planning everyone should drop what they're doing to go watch. Linux ain't gonna improve itself, and the pains of docker are an excellent entry to pressuring linux devs to do anything that can improve userspace experience, an otherwise deeply unlikely prospect. It took them more than a decade to implement basic jailing after BSDs and the tech is still, shall we say, extremely rough....

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by hedora on Monday November 02, 2020 @10:33PM (#24976038)
Yeah. I can’t even get some Linux containers to run under $ESCOTERIC_DEBIAN_BASED_DISTRO.

The ancient rhel something something doesn’t like the debian other thing, and I even saw a changelog about broken kernel compatibility and flipping a flag in proc or cmdline but then I forgot what it said.

Whatever. Life is short. Docker is in no way independent of the host kernel. Spend time debugging something else.

SmartOS is great though. I wish they’d take over the world.

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by danieldk on Tuesday November 03, 2020 @02:46AM (#24977375)
To give this argument some more meat with an example: some older glibc versions use vsyscalls and not vDSO. And kernels in some modern distributions disable vsyscall emulation. This is a problem because people use CentOS 5 or 6 images to build binaries that are compatible with many historical glibc versions.

If the host system does not enable vsyscall emulation, running binaries on such old distributions will lead to segfaults. (Which can be resolved by booting the host kernel with vsyscall=emulate.)

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by yjftsjthsd-h on Tuesday November 03, 2020 @12:23AM (#24976624)
> Yeah. I can’t even get some Linux containers to run under $ESCOTERIC_DEBIAN_BASED_DISTRO.

I would love any details you can provide; that sounds interesting. (I'm an OS nerd)

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by ArchOversight on Monday November 02, 2020 @03:46PM (#24973090)
Maybe not docker, but there is pot: https://potluck.honeyguide.net

Which aims to provide something similar as Docker for FreeBSD.

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by pizzamig on Monday November 02, 2020 @06:20PM (#24974633)
I'm the one behind pot, a framework to manage jails as containers. Here, there is the presentation on how to orchestrate jail using nomad, from Hashicorp: https://archive.fosdem.org/2020/schedule/event/orchestrating...

pot is nothing more than a Proof of Concept, a model that uses FreeBSD technologies to implements a typical container workflow: jail, ZFS, pf, rctl and cpuset.

There is no compatibility to OCI standards, but I believe it would be possible to implement them.

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by m_sahaf on Monday November 02, 2020 @08:49PM (#24975554)
There's also Bastille, which looks very interesting: https://bastillebsd.org/
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by justincormack on Monday November 02, 2020 @03:45PM (#24973064)
Every couple of years people express interest but no one has ever done the work. It is very much doable as the original port showed, and the zfs driver already exists for image layering as that works on Linux.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by takeda on Monday November 02, 2020 @04:51PM (#24973860)
I think that the people who work on it have goal to run linux in it and that causes the project to be more complex than it should. For example if you use Linux on ARM you still need to build new containers, because the x86_64 won't work there, so why it should be different with FreeBSD? Yes, it would be great to run the same docker images on FreeBSD, but that should be a later step, and stuff like described in this wiki, could be used to accomplish that.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by danieldk on Tuesday November 03, 2020 @03:26AM (#24977606)
For example if you use Linux on ARM you still need to build new containers, because the x86_64 won't work there,

Actually, it would with qemu user-mode emulation. This can be done transparently with binfmt_misc, which is a one or two-liner on many distributions.

BuildKit now can now also automatically without any additional setup:

https://github.com/moby/buildkit/pull/1516

But I do understand your point, Linux emulation on FreeBSD may be incomplete/incorrect in places, so you have to address to problems at the same time. Unfortunately, I think this is also what people would expect from Docker support - the ability to pull arbitrary images.

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by whizzter on Tuesday November 03, 2020 @04:47AM (#24978068)
> But I do understand your point, Linux emulation on FreeBSD may be incomplete/incorrect in places, so you have to address to problems at the same time. Unfortunately, I think this is also what people would expect from Docker support - the ability to pull arbitrary images.

This is really an important point, MS failed to get WSL1 good enough so WSL2 was just a plain Linux kernel being virtualized. Maybe running a some partially virtualized linux kernel(Linux already has modes for this?) via bhyve relying on a host FreeBSD filesystem (using the already developed layering) might be an feasible approach that requires less Linux API chasing while retaining the "native" FS advantage at the expense of some extra memory (bhyve) ?

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by trasz on Tuesday November 03, 2020 @04:57AM (#24978115)
From what I understand, with qemu-usermode you're still risking incompatibilities, as QEmu needs to be able to handle the syscalls to translate (or 'transmarshal', if that's a word) each of the syscalls.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by trasz on Tuesday November 03, 2020 @05:32AM (#24978285)
There has been some work done: https://reviews.freebsd.org/D21570. It appears stalled, though.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by q3k on Monday November 02, 2020 @04:53PM (#24973876)
There used to be a thing like this called jetpack [1], but unfortunately the project has died.

[1] - https://github.com/3ofcoins/jetpack

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by takeda on Monday November 02, 2020 @04:44PM (#24973793)
Maybe I'm wrong, but isn't this a key component required to have native support (without having to use a VM?)

Frankly, though docker failed to deliver most of its promises, but at least it became a standardized deployable unit.

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by jdc on Monday November 02, 2020 @04:46PM (#24973808)
macOS seems to do alright
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by takeda on Monday November 02, 2020 @05:49PM (#24974401)
MacOS runs a VM with Linux installation on it. That's why it takes so long to start, it is slow and uses so much CPU power and memory to run.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by big-malloc on Tuesday November 03, 2020 @09:30AM (#24979926)
Not to mention the unusable volume performance
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by djxfade on Monday November 02, 2020 @05:12PM (#24974086)
Docker on macOS uses a VM for the kernel. Its much slower than on a Linux host
[dead]
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by jen20 on Monday November 02, 2020 @03:26PM (#24972801)
> glued together example of an OS

This is a strange assertion when the implication is that Linux is somehow not "glued together" despite requiring distributions to literally glue the pieces together.

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by nickexyz on Monday November 02, 2020 @04:53PM (#24973884)
> Now if only if FreeBSD wasnt an slow, unstable, glued together example of an OS.

I really don't see how this kind of comment adds to the conversation. As jen20 wrote, GNU/Linux really is glued together.

Linux is great, but FreeBSD are in my opinion both more stable and less "glued together". Since you have a clear separation between the system and user installed packages, there usually are less things that breaks. In my experience of course.

To be fair, I was kind of anti BSD as well before giving it a real chance.

In any case, I really hope the BSD:s continue to grow. One OS is never a good thing, and Linux seems to eat up most of the market right now.

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by centimeter on Monday November 02, 2020 @04:55PM (#24973903)
FreeBSD's point of distinction is that it's carefully designed and fitted together, compared to Linux's comparatively heavy use of glue.

I also haven't heard credible reports of it being slow, except for things it's not really used for (like drivers for consumer wifi cards).

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by nix23 on Monday November 02, 2020 @05:30PM (#24974256)
Well Linux is just a kernel, so it's a bit unfair to call it glued together...but the rest (a ditro)...lot of glue and clay...sometimes also pure mud.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by a1369209993 on Monday November 02, 2020 @06:49PM (#24974838)
Don't forget the duct tape, bailing wire, and gum.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by yjftsjthsd-h on Tuesday November 03, 2020 @12:25AM (#24976637)
Nobody uses just the kernel alone, so I think it's fair to consider the other required components when looking at the system.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by mulmen on Tuesday November 03, 2020 @01:31AM (#24976955)
But FreeBSD is an operating system. The userland and kernel are developed together, in the same source tree AFAIK. With Linux you have to glue a user land on to use the kernel, which is a "distribution" which is actually an operating system.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by yjftsjthsd-h on Tuesday November 03, 2020 @02:38PM (#24983157)
Agreed? I thought we were talking about Linux
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by nix23 on Tuesday November 03, 2020 @04:50PM (#24984413)
Linux is a Kernel...like you said, are you talking about

gnu/linux

musl/gnu/linux

musl/busybox/linux

libc++/uClibc/glibc/musl/busybox/matchbox/gnu/rpm/deb/tar.gz

any other distro/composition of software that runs on linux? You see the problem? Linux is a kernel, FreeBSD/Open/Net/Dragonfly are real OS's...with pkg's.

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by yjftsjthsd-h on Tuesday November 03, 2020 @08:33PM (#24985912)
The grandparent of my post was:

>> FreeBSD's point of distinction is that it's carefully designed and fitted together, compared to Linux's comparatively heavy use of glue.

To which was offered:

> Well Linux is just a kernel, so it's a bit unfair to call it glued together...but the rest (a ditro)...lot of glue and clay...sometimes also pure mud.

So I pointed out that it is fair to call it glued together, because there's no other way to use Linux except with glue. This is applicable to any of GNU/Linux, Busybox/Linux, etc.

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by nix23 on Wednesday November 04, 2020 @08:46AM (#24988959)
But one could get rid of the clay and mud...that was my point.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by mulmen on Tuesday November 03, 2020 @03:55PM (#24983885)
This is an article and thread about FreeBSD. Linux was invoked and compared to FreeBSD in a completely nonsensical way.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by darthrupert on Tuesday November 03, 2020 @01:25AM (#24976928)
That’s what systemd is giving the Linux world, though. A carefully designed system for a lot of very essential things, so that distros will need to apply less glue.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by nix23 on Tuesday November 03, 2020 @07:25AM (#24978982)
>carefully designed system

Ehm...really? Are you making fun of us?

Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by darthrupert on Tuesday November 03, 2020 @10:31AM (#24980499)
In this case, no.
Re:Ubuntu Linux Jail on FreeBSD 12.2-Release by nix23 on Tuesday November 03, 2020 @04:45PM (#24984371)
Ahhh the coconut ridle...