You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
1.1 KiB

  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
  4. VAGRANTFILE_API_VERSION = "2"
  5. Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  6. config.vm.box = "phusion-open-ubuntu-14.04-amd64"
  7. config.vm.box_url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box"
  8. # Or, for Ubuntu 12.04:
  9. config.vm.provider :vmware_fusion do |f, override|
  10. override.vm.box_url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vmwarefusion.box"
  11. end
  12. if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
  13. # Install Docker
  14. pkg_cmd = "wget -q -O - https://get.docker.io/gpg | apt-key add -;" \
  15. "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list;" \
  16. "apt-get update -qq; apt-get install -q -y --force-yes lxc-docker; "
  17. # Add vagrant user to the docker group
  18. pkg_cmd << "usermod -a -G docker vagrant; "
  19. config.vm.provision :shell, :inline => pkg_cmd
  20. end
  21. end