From the course: Learning Vagrant

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create a base box, part 2

Create a base box, part 2 - Vagrant Tutorial

From the course: Learning Vagrant

Start my 1-month free trial

Create a base box, part 2

- [Instructor] We're now ready to package this VM as a new box. Before we do, we need to take a look at the Vagrant file we'll be packaging with the box. Open the Vagrantfile in the Vagrant_file directory. This Vagrantfile will be included in the box we are going to create. This is not the same as the Vagrantfile we're using to create the node developer environment box. You'll notice, on line 31, that the port forwarding configuration is here, but if you scroll to the provisioning section, you'll see that the provisioners are not defined. This Vagrantfile will be packaged with the box and will be part of the Vagrantfile load order. Here is the order in which Vagrantfiles are loaded. First, the Vagrantfile packaged with the box is loaded. The next Vagrantfile is the one found in the .Vagrant.d, if one is there, set for user profile defaults. Finally, the Vagrantfile in the Vagrant environment directly is loaded. The Vagrantfile in the local environment has the final say, so to speak…

Contents