Information Technology Reference
In-Depth Information
# Host OS (e.g., Windows, Linux, OS X)
$ cd git-recipes
$ mkdir 11-06
$ cd 11-06
Create the Vagrantfile appropriate for your system: if you work on Windows than
change Vagrantfile as shown in
Listing 11-3
.
If you work on a Unix-like system then
use the Vagrantfile shown in
Listing 11-4
.
Listing 11-3.
The Vagrantfile in Recipe 11-6 for Windows
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise32"
config.vm.box_url = "
http://files.vagrantup.com/
config.vm.network :forwarded_port, guest: 9418, host:
9418
config.vm.synced_folder "c:\\some\\where\\git-recipes",
"/pub/git"
end
Listing 11-4.
The Vagrantfile in Recipe 11-6 for Unix-like systems
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise32"
config.vm.box_url = "
http://files.vagrantup.com/
config.vm.network :forwarded_port, guest: 9418, host:
9418
config.vm.synced_folder "/some/where/git-recipes",
"/pub/git"
end