I don’t like to install binary vagrant boxes.
The main reason for this is that unknown box can contain malicious software.
The only boxes that I install are the boxes officially distributed by hashicorp, ubuntu or chef, like:
That’s why I prefer to distribute my boxes using their source code. The term “source code” in this case means:
- automatic provisioning with scripts
This post describes how to prepare and install the box named symfony-v0.4.4.
2. Clone the source code
Clone my repository:
$ git clone --recursive [email protected]:by-examples/symfony-vagrant-box-factory.git $ cd symfony-vagrant-box-factory
symfony-v0.4.4 is tagged.
You may see the tags with:
$ git log --oneline --decorate
3. Check out the version symfony-v0.4.4
$ git checkout -b tmp symfony-v0.4.4
Now, before you proceed with booting the box that I have prepared you may take a look at its contents.
This gives you the opportunity to check wheather this box contains any software that you consider dangerous.
In my opinion, everything is safe, but it is up to you to make this decision.
4. Generate the box file
$ vagrant up $ vagrant package --output symfony-v0.4.4.box
5. Install the box in your system
$ vagrant box add symfony-v0.4.4 symfony-v0.4.4.box
Now, you can remove the box:
$ rm symfony-v0.4.4.box
6. Check the installation
$ vagrant box list
should now print (probably along with some other boxes) the name: