Skip to content

Instantly share code, notes, and snippets.

@brownoxford
Created August 11, 2015 20:42
Show Gist options
  • Save brownoxford/2dccaf974dfd47e5ae91 to your computer and use it in GitHub Desktop.
Save brownoxford/2dccaf974dfd47e5ae91 to your computer and use it in GitHub Desktop.
Docker on OSX
Create a folder to hold docker related binaries
mkdir -p ~/Software/docker/bin
Docker Machine Installation:
Check here for new releases, and change the URL used to download docker-machine as needed: https://github.com/docker/machine/releases
curl -L https://github.com/docker/machine/releases/download/v0.3.0/docker-machine_darwin-amd64 > ~/Software/docker/bin/docker-machine
chmod +x ~/Software/docker/bin/docker-machine
Docker Client Installation:
curl -L https://get.docker.com/builds/Darwin/x86_64/docker-latest > ~/Software/docker/bin/docker
chmod +x ~/Software/docker/bin/docker
Add Docker utilities to path by editing ~/.profile and adding the following:
# Ensure that docker tools can be found
export DOCKER_HOME=~/Software/docker
export PATH=${DOCKER_HOME}/bin:$PATH
Create a docker host on an unused subnet
Note that specifying the host only network requires docker-machine v0.3.0 or later
docker-machine create \
--driver virtualbox \
--virtualbox-cpu-count "2" \
--virtualbox-memory "2048" \
--virtualbox-hostonly-cidr "172.45.0.0/24" \
phpunit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment