|
| 1 | +# -*- mode: ruby -*- |
| 2 | +# # vi: set ft=ruby : |
| 3 | + |
| 4 | +Vagrant.configure("2") do |config| |
| 5 | + config.vm.box = "coreos-alpha" |
| 6 | + config.vm.box_url = "http://alpha.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json" |
| 7 | + |
| 8 | + config.vm.provider :vmware_fusion do |vb, override| |
| 9 | + override.vm.box_url = "http://alpha.release.core-os.net/amd64-usr/current/coreos_production_vagrant_vmware_fusion.json" |
| 10 | + end |
| 11 | + |
| 12 | + config.vm.provider :virtualbox do |vb, override| |
| 13 | + # Fix docker not being able to resolve private registry in VirtualBox |
| 14 | + vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] |
| 15 | + vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] |
| 16 | + end |
| 17 | + |
| 18 | + config.vm.provider :virtualbox do |v| |
| 19 | + # On VirtualBox, we don't have guest additions or a functional vboxsf |
| 20 | + # in CoreOS, so tell Vagrant that so it can be smarter. |
| 21 | + v.check_guest_additions = false |
| 22 | + end |
| 23 | + |
| 24 | + # plugin conflict |
| 25 | + if Vagrant.has_plugin?("vagrant-vbguest") then |
| 26 | + config.vbguest.auto_update = false |
| 27 | + end |
| 28 | + |
| 29 | + config.vm.define vm_name = 'docker-registry' do |config| |
| 30 | + config.vm.hostname = 'docker-registry' |
| 31 | + config.vm.network :private_network, ip: "172.21.12.100" |
| 32 | + |
| 33 | + # user-data bootstrapping |
| 34 | + config.vm.provision :file, :source => "user-data", :destination => "/tmp/vagrantfile-user-data" |
| 35 | + config.vm.provision :shell, :inline => "mv /tmp/vagrantfile-user-data /var/lib/coreos-vagrant/", :privileged => true |
| 36 | + end |
| 37 | + |
| 38 | +end |
0 commit comments