Skip to content

Instantly share code, notes, and snippets.

@dayreiner
Last active May 10, 2022 08:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dayreiner/94eebd3b697ab5ab69f0 to your computer and use it in GitHub Desktop.
Save dayreiner/94eebd3b697ab5ab69f0 to your computer and use it in GitHub Desktop.
HOWTO: Docker 1.10.0-rc3 on OSX El Capitan with docker-compose 1.6.0-rc2 and docker-machine 0.6.0-rc3. Use Xhyve driver instead of virtualbox for performance.

Docker 1.10.0 rc3 with Docker Compose 0.6 and Docker Machine 1.6 and Xhyve on OSX

Also posted here: http://18pct.com/docker-1.10.0rc3-with-compose,-machine-and-xhyve-on-osx/

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment