Skip to content

Instantly share code, notes, and snippets.

@jessedc
Last active November 7, 2019 17:46
Show Gist options
  • Save jessedc/ca7d9e119bda449566f959dcb74a684f to your computer and use it in GitHub Desktop.
Save jessedc/ca7d9e119bda449566f959dcb74a684f to your computer and use it in GitHub Desktop.
How to Build Laravel Homestead vagrant base box from Source

How to build the Laravel Homestead base box (settler) from source

Sometimes you need the latest updates from Laravel Settler the Homestead base box source.

This assumes you're on macOS and have homebrew, Vagrant and Virtualbox installed.

These instructions are a slighly expanded version of the settler readme

mkdir settler-master
cd settler-master
git clone git@github.com:laravel/settler.git
git clone git@github.com:chef/bento.git
cd settler
./bin/copy-to-bento.sh

Install Packer with Homebrew

brew update
brew install packer

Update bento script as per settler instructions

"Replace scripts/cleanup.sh with scripts/homestead.sh in file ubuntu/ubuntu-16.04-amd64.json"

Build with Packer

packer build -only=virtualbox-iso ubuntu-16.04-amd64.json

Add new box to vagrant

vagrant box add laravel/homestead-master ../builds/ubuntu-16.04.virtualbox.box

Update Homestead.yml

Add the following lines to your homestead.yml

box: laravel/homestead-master
version: ">= 0"

Run Vagrant

vagrant up

You may need to destroy your existing homestead installation first with vagrant destroy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment