Skip to content

Instantly share code, notes, and snippets.

@jmissig
Forked from friend0/dockerXhyveDriverInstall.sh
Last active October 7, 2021 19:39
Show Gist options
  • Save jmissig/3181cb8812971c549860d00c530a7870 to your computer and use it in GitHub Desktop.
Save jmissig/3181cb8812971c549860d00c530a7870 to your computer and use it in GitHub Desktop.
Install xhyve driver for docker using macports
# 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
sudo port install xhyve
# Install go, qcow-format for qcow2 disk image format
$ sudo port install go opam libev
$ export GO15VENDOREXPERIMENT=1
$ export GO111MODULE="auto"
# 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 --compiler=4.05.0
$ eval `opam config env`
$ opam install uri.3.1.0 qcow-format conf-libev
# Connect MacPorts version of libev.a
$ ln -s /opt/local/lib/libev.a /usr/local/lib/libev.a
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment