- Operating System and Software Version
- Install Packer
- Create Vagrant Boxes with Packer
The objective is to create vagrant base boxes with Packer
Operating System and Software Version
- Operating System: Ubuntu 18.04 LTS
- Software: Packer 1.2.5(Binary) or Packer 1.0.4(Ubuntu Repository)
Binary downloaded from official website
Download installer from Packer Releases, and unzip the installer in the local workspace. For convenience, I add it in the PATH environment.
sudo apt install packer
Create Vagrant Boxes with Packer
Packer allows you to create a personal Vagrant base box easily. This means that you don’t need to rely anymore on some random ready-made boxes from the Internet. With Packer, you know what is being installed into your base box and hence the box can be more trustworthy. While Packer supports Vagrant, it can also be used to prepare a system for VirtualBox, VMware and so on.
You could find detailed semantic of configuration file for virtualbox provider in Packer Documentation.
And the instruction for Packer to build Vagrant Box is :
packer build XXXX.json