This provides the configuration to build a Vagrant minimal box using Packer. The box is intended for server (terminal) use only which allows for a smaller box size.
There is a template provided for the CentOS-7 x86_64
architecture.
The build environment required is Mac OSX or GNU Linux.
To build the box file you will need the following installed:
- VirtualBox (6.1.10)
- Vagrant (2.2.10)
- Packer (v1.6.5)
It is assumed that you have downloaded the CentOS-7-x86_64-Minimal-2003.iso and placed it in the packer-centos directory as CentOS-7-x64-Minimal.iso.
Alternatively, you may edit the iso_url in the CentOS-7-x64.json which is the packer template file:
For instance; "iso_url": "http://mirror.ucu.ac.ug/centos/7.8.2003/isos/x86_64/CentOS-7-x86_64-Minimal-2003.iso"
- Clone this repository:
$ git clone https://github.com/miirochristopher/packer-centos.git
- Go to the root directory.
$ cd packer-centos/
- To build the
x86_64
box, run:
$ PACKER_LOG=1 PACKER_LOG_PATH=packer.log packer build CentOS-7-x64.json
- To run the box, run:
$ vagrant up
- To ssh into the box, run:
$ vagrant ssh