docker-machine-driver-xhyve icon indicating copy to clipboard operation
docker-machine-driver-xhyve copied to clipboard

Use official go wrapper

Open copumpkin opened this issue 7 years ago • 8 comments

As of https://github.com/docker/hyperkit/pull/104 (which just got merged), Hyperkit has its own "official" go wrapper, which would probably be simpler to use/maintain than the one in this project.

copumpkin avatar Mar 21 '17 01:03 copumpkin

@copumpkin Yeah, I considered and saw this binding.

I think hyperkit has been provided binary call API for third-party is great. but I thought, It's just binary wrapper call, so required installing the "Docker for Mac" Application. Currently, this project is no dependency except vendor package. So if users (of curse, I'm already installed Docker for Mac) not like, or not installed "Docker for Mac", docker-machine-driver-xhyve become can't work.

However, maintain the libhyperkit needs very higher cost. really. So, now I don't know which is better way.

/cc @dlorenc @r2d4 What do you think about it?

zchee avatar Mar 21 '17 06:03 zchee

I think we should probably switch to the wrapper. They just added support for vmnet networking, which was missing before and required by this.

dlorenc avatar Jun 28 '17 14:06 dlorenc

Another thing that might be worth investigating is that the suid bit is only needed for vmnet networking, so if we can switch to e.g., VPNKit (i.e., map to unprivileged ports, etc.), we could get away with no superuser privileges, at least in some cases. For me at least that's been a fairly annoying sticking point of using this stuff.

copumpkin avatar Jun 28 '17 15:06 copumpkin

@dlorenc OK, I’ll check official go wrapper internal. And will try to rewrite xhyve-driver all logic.

But, it means we can’t static build to hyperkit C source.(libhyperkit) It depends on hyperkit binary(AFAIK) So this driver users needs build hyperkit from source, or install Docker for Mac. That is a matter of concern. What do you think about it?

zchee avatar Jun 28 '17 15:06 zchee

@copumpkin Thanks comment. Sorry, now time for bed in Japan. I’ll comment tomorrow.

zchee avatar Jun 28 '17 15:06 zchee

Have a good night :)

Hyperkit is now packaged in brew: https://github.com/moby/hyperkit/issues/119

Perhaps we could depend on it that way, from the brew package for docker-machine-driver-xhyve.

dlorenc avatar Jun 28 '17 16:06 dlorenc

@dlorenc Thanks :)

Oh, that’s good news. OK, I’ll digging hyperkit Go bindings.

Good night💤

zchee avatar Jun 28 '17 16:06 zchee

We used to have a hyperkit binding that included the C code, but there were lots of threading issues and other problems, hence we switched to calling the binary, even though it is less nice in some ways.

justincormack avatar Sep 11 '17 09:09 justincormack