Vagrantfile 859 B

123456789101112131415161718192021222324252627
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. #
  4. Vagrant.require_version '>= 1.5.0'
  5. Vagrant.configure("2") do |config|
  6. config.vm.box = "precise64"
  7. config.vm.box_url = "http://files.vagrantup.com/precise64.box"
  8. config.vm.network :forwarded_port, host: 4001, guest: 4001
  9. config.vm.network :forwarded_port, host: 7001, guest: 7001
  10. # Fix docker not being able to resolve private registry in VirtualBox
  11. config.vm.provider :virtualbox do |vb, override|
  12. vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
  13. vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
  14. end
  15. config.vm.provision "docker" do |d|
  16. d.build_image "/vagrant", args: '-t etcd'
  17. d.run "etcd", args: "-p 4001:4001 -p 7001:7001", demonize: true
  18. end
  19. # plugin conflict
  20. if Vagrant.has_plugin?("vagrant-vbguest")
  21. config.vbguest.auto_update = false
  22. end
  23. end