machine-drivers / docker-machine-driver-xhyve

docker-machine/minikube/minishift driver plugin for xhyve/hyperkit (native macOS hypervisor.framework)
https://godoc.org/github.com/machine-drivers/docker-machine-driver-xhyve
BSD 3-Clause "New" or "Revised" License
888 stars 74 forks source link

Add check binary owner on PreCreateCheck() #75

Closed zchee closed 8 years ago

zchee commented 8 years ago

See also https://github.com/zchee/docker-machine-driver-xhyve/pull/75

johanneswuerbach commented 8 years ago

This won't support sudo docker-machine create -d xhyve right? I would like if both cases are handled and the driver checks before every command stop, restart touching xhyve whether the permissions are correct. WDYT?

zchee commented 8 years ago

@johanneswuerbach That's correct. PreCreateCheck() is only called when creating command. I think need check owner before all commands such as PreCommandCheck()(or PreOwnerCheck?). I will more fix when merged this PR.

but, Do we require corrective action of sudo? Currently, there are users who would put the sudo before docker-machine command, but docker-machine other drivers are not instructed put the sudo. So, I think solve if I write a more detail usage. When install by Homebrew, users do not know how to use and flags, they will see this repository.

Check of the owner is required. and, If does not exists $HOME/.docker directory, boot2docker.iso file and $HOME/.docker/machine/cache directory will be create by root owner.

This problem is also required improve.

WDYT?

Sorry, I am sleepy, English is rough... :scream_cat:

zchee commented 8 years ago

@johanneswuerbach But put as insurance might be good!

zchee commented 8 years ago

@johanneswuerbach I created other issue. It will tentatively merge this PR.

johanneswuerbach commented 8 years ago

Thanks, :bow:

zchee commented 8 years ago

@johanneswuerbach Create pull-request! https://github.com/zchee/docker-machine-driver-xhyve/pull/78

Handling own binary owner, and sudo before docker-machine command. It's probably working.