Vagrant.configure(2) do |config|
config.vm.provider "virtualbox" do |v|
v.memory = 2048
+ v.cpus = 4
end
config.vm.define :dockerhost do |config|
config.vm.box = "trusty64"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
+ if ENV["http_proxy"]
+ config.vm.provision "shell", inline: <<-EOF
+ echo "Acquire::http::Proxy \\"#{ENV['http_proxy']}\\";" >/etc/apt/apt.conf.d/50proxy
+ echo "http_proxy=\"#{ENV['http_proxy']}\"" >/etc/profile.d/http_proxy.sh
+ EOF
+ end
+
config.vm.provision "shell", inline: <<-EOF
set -e
ln -s /vagrant /var/discourse
EOF
-
- if ENV["http_proxy"]
- config.vm.provision "shell", inline: <<-EOF
- echo "Acquire::http::Proxy \\"#{ENV['http_proxy']}\\";" >/etc/apt/apt.conf.d/50proxy
- echo "http_proxy=\"#{ENV['http_proxy']}\"" >/etc/profile.d/http_proxy.sh
- EOF
- end
end
end