Vagrant wrapper allows you to store a single Vagrantfile in a predefined location $VAGRANTW_DIR and use that across multiple projects with ease. Think like the popular virtualenvwrapper but for Vagrant. An Example Let’s say for instance I have a project that looks like the following: ./example └── main.c 0 directories, 1 file And I need to test if it compiles on Ubuntu when I’m running on a Mac or Fedora. In this situation you have a few options: Spin up a VM using Vagrant The problem here is then I’d have to add a Vagrantfile to this projects repo and either commit it or Gitignore it. This becomes more arduous when you have multiple projects like this since you have to maintain a Vagrantfile per project. So our project looks like this: ./example └── main.c └── Vagrantfile 0 directories, 1 file Use a docker container The problem with docker containers is shared with that of the above solution of ‘Vagrant per project’.
Continue Reading