Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jul 2020 15:19:29 -0400
From:      Paul Mather <paul@gromit.dlib.vt.edu>
To:        freebsd-questions@freebsd.org
Subject:   Re: Technological advantages over Linux
Message-ID:  <782005A6-D264-4FFF-AADF-D238EE7F1595@gromit.dlib.vt.edu>
In-Reply-To: <mailman.79.1595678403.7820.freebsd-questions@freebsd.org>
References:  <mailman.79.1595678403.7820.freebsd-questions@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 25 Jul 2020 13:55:42 +0700, Victor Sudakov <vas@sibptus.ru> =
wrote:

> Message: 14
> Date: Sat, 25 Jul 2020 13:55:42 +0700
> From: Victor Sudakov <vas@sibptus.ru>
> To: freebsd-questions@freebsd.org
> Subject: Re: Technological advantages over Linux
> Message-ID: <20200725065542.GG92589@admin.sibptus.ru>
> Content-Type: text/plain; charset=3D"us-ascii"
>=20
> Dear Paul,
>=20
> You have intrigued me.
>=20
> Paul Mather wrote:
>>=20
>>=20
>> I also agree that this is a big disadvantage.  Whenever I make my
>> donation to the FreeBSD Foundation, and they ask in the donation form
>> for comments on what you want them to work/focus on in the future, I
>> always put a plug in for a native bhyve driver for docker-machine.
>=20
> What would be run by the docker-machine in bhyve?


Basically, it would be the same thing you would run when you use =
docker-machine with the VirtualBox plugin: some sort of minimal shim =
Linux distribution (akin to boot2docker or whatever is used nowadays).


>> This would go some way to putting it on a par with Docker under =
macOS,
>> which uses HyperKit to interface with the built-in hypervisor under
>> macOS (which is based on bhyve).  MacOS is considered a "first class
>> citizen" under the Docker ecosystem, or at least has great support =
via
>> Docker Desktop.
>=20
> What does MacOS run in its hypervisor by the docker-machine? Some =
linux
> flavor? It does not have a native docker server, does it?


Yes, AFAIK, macOS does not have a native Docker engine: it runs a small =
Linux shim.  As the Docker Desktop for Mac page =
(https://hub.docker.com/editions/community/docker-ce-desktop-mac) puts =
it, it features, "Fast and reliable performance with native macOS =
virtualization running a custom minimal Linux distro."

Bhyve =3D native FreeBSD virtualisation.


>> Last I looked, FreeBSD only supported VirtualBox with
>> docker-machine.  It would be great to have native bhyve support.
>=20
> I agree.


It would only be a small step forward, but an improvement.  Right now, =
if you want to run Docker hosts on FreeBSD you typically have to use =
docker-machine with VirtualBox.  Having a bhyve docker-machine plugin =
would let you run Docker hosts via bhyve, which is now a native FreeBSD =
technology.  You wouldn't have to install the VirtualBox port, with the =
various headaches that brings involving keeping that port's kernel =
modules in sync with the installed kernel.

Docker is very well integrated with macOS via HyperKit/xhyve.  A similar =
approach should be possible under FreeBSD---probably not all the GUI =
integration, but at least for the Docker hosts.  As I keep saying, this =
strikes me as a support limitation, not a technical limitation when it =
comes to FreeBSD. :-)


> But I thought, perhaps with the Linux binary compatibility, we could
> avoid running a Linux in bhyve?


The original sysutils/docker-freebsd achieved just that.  It relied on =
FreeBSD's Linux compatibility to run Linux Docker images directly.  I =
believe problems with completeness of the Linux emulation, but, more so, =
the lack of maintainers/support for the port meant it fell behind and =
ultimately was deleted.


> Or can we convince Docker to start supporting jails (just a dream)?


It's not so strange.  There was some movement towards implementing the =
open container specification for FreeBSD a while ago, e.g., Jetpack =
(https://github.com/3ofcoins/jetpack) and runc =
(https://github.com/clovertrail/runc/tree/1501-SupportOnFreeBSD).  =
Jetpack (more inspired by rkt I believe) even uses jails as its =
isolation mechanism.

Unfortunately, these projects appear to have become inactive, but I =
guess they point to what is possible given the will and resources.

Native Docker containers under FreeBSD is not such a strange notion.  =
It's my impression that native Docker containers under Windows is quite =
a thing now. :-)

Cheers,

Paul.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?782005A6-D264-4FFF-AADF-D238EE7F1595>