docker

The steps below will uninstall docker, docker-machine and docker-compose under OSX using virtualbox (via either brew or toolbox, or both), and replace them with the latest RC versions of docker, compose and machine using the Xhyve driver for better performance under OSX using Hypervisor.framework.


If you don’t have homebrew already, install it

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

make sure old docker versions are removed

Remove toolbox via its uninstaller if you have it:

sudo sh -c "$(curl -fsSl https://raw.githubusercontent.com/docker/toolbox/master/osx/uninstall.sh)"

…as well as remove any versions installed via brew

brew uninstall docker docker-compose docker-machine

install docker OSX client v1.10.0-rc3

curl -L https://test.docker.com/builds/Darwin/x86_64/docker-1.10.0-rc3 > /usr/local/bin/docker
chmod +x /usr/local/bin/docker

install machine v0.6.0-rc3

curl -L https://github.com/docker/machine/releases/download/v0.6.0-rc3/docker-machine-Darwin-x86_64 > /usr/local/bin/docker-machine
chmod +x /usr/local/bin/docker-machine

install compose v1.6.0-rc2 (rc3 not out as of writing)

curl -L https://github.com/docker/compose/releases/download/1.6.0-rc2/docker-compose-Darwin-x86_64 > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

install xhyve

brew install xhyve

install docker xhyve driver v0.2.2

curl -L https://github.com/zchee/docker-machine-driver-xhyve/releases/download/v0.2.2/docker-machine-driver-xhyve > /usr/local/bin/docker-machine-driver-xhyve
chmod +x /usr/local/bin/docker-machine-driver-xhyve
sudo chown root:wheel /usr/local/bin/docker-machine-driver-xhyve
sudo chmod u+s /usr/local/bin/docker-machine-driver-xhyve

create default docker machine using docker v1.10.0-rc3 boot2docker iso

Remove old default machine if it exists:

docker-machine rm default

Install the new default machine using the rc3 boot2docker iso:

docker-machine create default --driver xhyve --xhyve-experimental-nfs-share --xhyve-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v1.10.0-rc3/boot2docker.iso

start docker-machine

If you used the machine name “default”, there’s no need to specify the default machine in 1.6.

docker-machine start

get env

eval $(docker-machine env)

test!

docker run hello-world