Created
March 24, 2017 19:03
-
-
Save friend0/084b4a772827430e4f8a21f42badca63 to your computer and use it in GitHub Desktop.
Install xhyve driver for docker using macports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you've installed docker toolbox stuff previously, not macports. Else, you can skip. | |
sh -c "$(curl -fsSl https://raw.githubusercontent.com/docker/toolbox/master/osx/uninstall.sh)" | |
sudo port install docker docker-machine docker-compose | |
# Install go, qcow-format for qcow2 disk image format | |
$ sudo port install go opam libev | |
$ export GO15VENDOREXPERIMENT=1 | |
# Fetch the driver source | |
$ go get -u -d github.com/zchee/docker-machine-driver-xhyve | |
$ cd ~/go/src/github.com/zchee/docker-machine-driver-xhyve | |
$ opam init | |
$ eval `opam config env` | |
$ opam install uri qcow-format conf-libev | |
# Install docker-machine-driver-xhyve binary into /usr/local/bin | |
$ make install | |
# docker-machine-driver-xhyve need root owner and uid | |
$ sudo chown root:wheel /usr/local/bin/docker-machine-driver-xhyve | |
$ sudo chmod u+s /usr/local/bin/docker-machine-driver-xhyve |
On a more recent system at the time of writing I needed to exchange line 13 to:
$ opam switch create 4.05.0 && opam init --compiler=4.05.0
I’ve not been able to fully build this yet, but on more contemporary versions of Go, I had to do this before line 10 to get src
folder:
export GO111MODULE="auto"
Ok and then based on some issues with compiling hyperkit, I figured out to install uri.3.1.0
and make sure angstrom
and bigstringaf
were not installed.
Also, need to get the local Makefile to see the MacPorts-installed version of libev.a.
And finally, it looks like xhyve
needs to be installed for this to work at all.
sudo port install xhyve
Which makes sense, but I don’t think it’s explicitly required anywhere.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For macports users