Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make docker-machine-driver-xhyve go gettable #49

Closed
saljam opened this issue Jan 8, 2016 · 5 comments
Closed

make docker-machine-driver-xhyve go gettable #49

saljam opened this issue Jan 8, 2016 · 5 comments

Comments

@saljam
Copy link
Contributor

saljam commented Jan 8, 2016

Building with the makefile might be useful for development, but you don't always need one for Go and being able to install the driver binary by just running:

go get github.com/zchee/docker-machine-driver-xhyve

makes it easier to get started and is more idiomatic Go.

@saljam
Copy link
Contributor Author

saljam commented Jan 8, 2016

I propose we do that by moving the go files in the root directory into a directory of their own called "xhyve" (to match the package name) and moving bin/main.go to the root. (Or to cmd/docker-machine-driver-xhyve similar to how golang.org/x/tools does it for example.)

What do you think? Would this break the build in any way I've not anticipated?

@zchee
Copy link
Member

zchee commented Jan 8, 2016

@saljam Thanks issue!

I was inspired by your comments(It's not that the folder structure), I have testing it now.
I will reply later.

@zchee
Copy link
Member

zchee commented Jan 9, 2016

@saljam I think so, too.
The reason is that the first docker-machine driver sample repository was that folder structure.
As you have proposed, I think,

  • Move zchee/docker-machine-driver-xhyve/bin/main.go to zchee/docker-machine-driver-xhyve/main.go
  • Move zchee/docker-machine-driver-xhyve/*.go to zchee/docker-machine-driver-xhyve/xhyve
  • Change main.go import pkg to zchee/docker-machine-driver-xhyve/xhyve

Same as https://github.com/saljam/docker-machine-driver-xhyve/commit/9967bae0cd7a796bdcd528b898b6bff1ac981be3.

However, in a typical docker-machine driver will be complete in it, but docker-machine-driver-xhyve binary need owner to root:wheel, and set root uid (-rwsr-xr-x root:wheel) hack.
The caused by vmnet.framework required sudo.
See https://github.com/zchee/docker-machine-driver-xhyve/blob/master/Makefile#L119

So, Folder structure will be clean, but can not full installation only go get for now.

@saljam
Copy link
Contributor Author

saljam commented Jan 9, 2016

Thanks! And yes, of course, it will still need to be run as root.

@zchee
Copy link
Member

zchee commented Jan 12, 2016

Merged #53

Close.

@zchee zchee closed this as completed Jan 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants