Docker Containers under Haiku

So, docker containers under Haiku could be possible. Docker under Mac OS X uses “docker machine” which essentially boots a Linux vm under your Mac OS X system, and ties the docker binary to communicate to it.

I’m not 100% sure of the process, and we would need to solidify our golang port… but it could be possible.

$ ls ~/.docker/machine/machines/default/
boot2docker.iso
ca.pem
cert.pem
config.json
default
disk.vmdk
id_rsa
id_rsa.pub
key.pem
server-key.pem
server.pem
5 Likes

And pointless unless we get VMs with hardware virtualization, right?

If you have enough cpu cycles, qemu-system-x86_64 without kvm works just fine… slowly :slight_smile:

How hard would be to get KVM implemented on Haiku? Is it even a good idea to do that? Is there any other useful function what depends on this?
Can one accomplish it without introducing linuxism and gpl to the kernel?

It doesn’t look impossible to be honest. Likely an easier project than Mesa / hardware 3d acceleration :slight_smile:


1 Like

That all said, maybe creating our own native system of sandboxing processes and adding support for Haiku to containerd would be time better spent :slight_smile:

Hi all,

I must admit, as a Pivotal/VMware employee, one of the things I’m looking forward to doing when my new HomeLab rig arrives is trying to play with Haiku VMs, as well as containers. I deal with containers every day at work.

What needs do people have for running containers with Haiku? Are you thinking more for running other containers in Haiku, or somehow enabling Haiku to be an effective containerised OS!?! (Probably a huge job…)

1 Like

Oh jeeze… just realized that I completely missed the linux ABI layer mentioning containerd under Haiku. Haha… kvm is time better spent. (and I don’t think we need Native Haiku containers :stuck_out_tongue: )

The SmartOS folks did a port of KVM to their platform. If KVM requires porting parts of Linux-specific functionality or another compat-layer, then I’m not sure about a KVM port for Haiku. Perhaps we could import NVMM for Haiku which is compatible with our license. Still not so sure about KVM, but we’ll see.

Then containerd requires Go. Our Go port is slowly being worked on and the problems are still in the bootstrap process. It can ‘compile’ the Haiku port of Go 1.11 in Haiku, but the bootstrap binary crashes instantly. I probably need gdb for x86_64 fully working before I can fix this but for the time being “Patches Welcome!”

If anyone can help, the Go port for Haiku has a new home and lives here https://github.com/golang-haiku

2 Likes

Yeah Go was one of the first things I looked at. I was considering getting the Pivotal Diego container runtime running on Haiku (for giggles, as you do…), which is built in Go too.

I’ve been looking at the runc code to… again Go based. A lot of the container/K8S elements are Go based, so getting the Go runtime working would seem to be a good place to start.

1 Like

What’s the state of the Haiku port of Go? I wonder if Google would consider supporting Haiku, it has to be at least as good, if not better and more worthwhile, than Plan 9.

We have a useable Go 1.4.3 port only for 64 bit which can be used to bootstrap to build later versions of Go. The original 1.3 port could not do this, so I updated the port to build Go versions higher than 1.5 and above.

I also ported Go 1.11 to Haiku which can be found here [0], the problem is during the bootstrap phase, the go_bootstrap binary crashes upon running it, which I am trying to solve. It’s likely that the Go 1.4.3 compiler is generating broken binaries for Haiku.

If we get that fixed, then we will be able to reliably build the latest Go compiler on Haiku.

[0] https://github.com/golang-haiku/go/tree/golang-1.11-haiku

4 Likes

That’s not the question here.

You cna probably see why one supports the other.

4 Likes

Just throwing this out as Haiku currently uses freebsd drivers for network and such. is there any possibility to bHyve being ported?

It’s FreeBSDs virtualisation platform which runs very smoothly.

There is also netbsd virtualisation platform too
https://blog.netbsd.org/tnf/entry/from_zero_to_nvmm

3 Likes

Yes, I’ve already started investigating the ins-and-outs of porting byhve, and that is probably what we will go with indeed.

5 Likes

Public branches or it didn’t happen. :slight_smile:

5 Likes

IIRC mmlr’s original QEMU port featured hardware acceleration under Haiku. Not sure how he did it, and it obviously didn’t last long, but maybe this path could be explored in the future.

4 Likes

Apparently, there was some work on kqemu:

But kqemu is now abandonned.