Last active
August 29, 2015 14:06
-
-
Save justincaldwell/fdd81dc0fc764e094526 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
| VAGRANTFILE_API_VERSION = "2" | |
| $script = <<SCRIPT | |
| curl -sSL https://get.docker.io/ubuntu/ | sudo sh | |
| usermod -a -G docker vagrant | |
| echo "DOCKER_OPTS='-H unix:///var/run/docker.sock -H tcp://0.0.0.0:5555 --dns 172.17.42.1 --dns 8.8.8.8 --dns-search service.consul'" | sudo tee -a /etc/default/docker | |
| curl -L -s https://github.com/docker/fig/releases/download/0.5.2/linux > /usr/local/bin/fig | |
| chmod +x /usr/local/bin/fig | |
| service docker restart | |
| apt-get install -y -q vim-nox | |
| update-alternatives --set editor /usr/bin/vim.nox | |
| SCRIPT | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| config.vm.box = "phusion-open-ubuntu-14.04-amd64" | |
| config.vm.box_url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box" | |
| config.vm.network "private_network", ip: "55.55.55.55" | |
| config.ssh.forward_agent = true | |
| config.vm.provision "shell", inline: $script | |
| config.vm.synced_folder "data", "/data" | |
| #config.vm.network "forwarded_port", guest: 3030, host: 3333 | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation
Install vagrant + virtualbox or vmware
Copy gist to Vagrantfile
Install docker on mac (
brew install dockerbut you can also download from docker's website)Make a data dir for volumes
Run the Vagrantfile
Set the DOCKER_HOST env var with
export DOCKER_HOST='tcp://55.55.55.55:5555'or make it more permanent withTest it out