This VM is designed to make it easy to start using Docker on OS X. Importantly, it includes support for easily sharing files from the host system into Docker containers.
-
Clone this repository.
-
Edit line 214 of the Vagrantfile so that points to your development/code directory on the host machine.
Vagrant.configure("2") do |config| config.vm.synced_folder "/your/dev/dir/here", "/var/code" end -
Install and start the vm
vagrant up vagrant halt vagrant up -
Confirm that Docker is running in the VM
vagrant ssh docker --version -
Add this line to the Docker configuration inside your VM (
/etc/default/docker):DOCKER_OPTS="-H tcp://0.0.0.0:4243" -
Restart Docker:
sudo service docker restart -
Add this line to your .profile on the host machine:
export DOCKER_HOST=tcp://localhost:48002 export DOCKER_TLS_VERIFY= -
From the host machine, confirm Docker is accessible:
docker ps