Skip to content

Instantly share code, notes, and snippets.

@nicolaracco
Created January 14, 2015 10:36
Show Gist options
  • Save nicolaracco/07fd2fae87cff7fdc835 to your computer and use it in GitHub Desktop.
Save nicolaracco/07fd2fae87cff7fdc835 to your computer and use it in GitHub Desktop.
Vagrantfile for boot2docker setup
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
cwd = File.expand_path '../', __FILE__
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
#config.vm.define "#{ENV['VAGRANT_DEFAULT_PROVIDER']}_boot2docker"
config.vm.box = "yungsang/boot2docker"
config.vm.network "private_network", ip: ENV['BOOT2DOCKER_IP'] || "10.211.55.5"
config.vm.provider "parallels" do |v, override|
override.vm.box = "parallels/boot2docker"
override.vm.network "private_network", type: "dhcp"
end
config.vm.network "forwarded_port", guest: 9292, host: 9292, auto_correct: true
config.vm.network "forwarded_port", guest: 80, host: 80, auto_correct: true
config.vm.network "forwarded_port", guest: 443, host: 443, auto_correct: true
config.vm.network "forwarded_port", guest: 5999, host: 5999, auto_correct: true
config.vm.network "forwarded_port", guest: 4444, host: 4444, auto_correct: true
config.vm.synced_folder cwd, cwd, type: "nfs", bsd__nfs_options: ["-maproot=0:0"], map_uid: 0, map_gid: 0
config.vm.synced_folder cwd, "/src", type: "nfs", bsd__nfs_options: ["-maproot=0:0"], map_uid: 0, map_gid: 0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment