Re: Docker

From: Paul Mather <paul_at_gromit.dlib.vt.edu>
Date: Sat, 01 Apr 2023 15:54:51 UTC
On Mar 29, 2023, at 1:34 AM, John Levine <johnl@iecc.com> wrote:

> It appears that Tomek CEDRO <tomek@cedro.info> said:
>> if there are lots of images for linux docker, and docker is linux only
>> solution, there is no reason to talk about it on bsd or even offer some
>> sort of images of bsd for linux right?
> 
> Docker runs on MacOS with a linux emulation layer.  FreeBSD already has
> some linux emulation so in principle one could do the same thing, but
> it'd be a lot of work for dubious benefit.


I disagree it would be of dubious benefit.  MacOS is a Tier 1 platform in the Docker ecosystem.  Using Docker Desktop on macOS makes using Docker and Kubernetes for development work very easy on that platform, meaning you can stay in the environment you prefer.  MacOS is not Linux, but the implementation on there is to use a shim Linux VM via the built-in macOS hypervisor (which, IIRC, is a derivative of bhyve).

It would be great if the same thing could be done on FreeBSD.  It would be beneficial if there was a supported docker machine driver for bhyve on FreeBSD.  Right now, I believe the road to running Linux containers on FreeBSD is to use the VirtualBox docker machine driver, which is a bit heavyweight (in terms of added dependencies) for my liking.  It would be nice if bhyve could be used to run the shim Linux VM.

Other than that, much of the tooling to run Docker and Kubernetes is already in ports.  But, those (e.g., in the case of Kubernetes) need to point to non-FreeBSD systems that are running the actual containers, pods, etc.  It would be nice to be able to do it all on FreeBSD, at least for development and kicking-the-tyres purposes.

Cheers,

Paul.