Skip to content

Commit 548cab2

Browse files
committed
Fallback to download a basic Ubuntu Server 14.04 64-bit image when the local box is unavailable
1 parent 33bddf5 commit 548cab2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Vagrantfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
## Define variables
22
VAGRANTFILE_API_VERSION = 2
3+
# Custom Local Vagrant Box Name
34
VM_BOX_NAME = "basic-base"
5+
# Ubuntu Server 14.04 LTS (Trusty Tahr) 64-bit.
6+
VM_BOX_URL = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
47

58
# Specify the minimum Vagrant version
69
Vagrant.require_version ">= 1.4.2"
@@ -21,6 +24,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
2124
# Define the base box to use.
2225
buildpack.vm.box = VM_BOX_NAME
2326

27+
# If this Vagrant box does not exist then download a clean box
28+
buildpack.vm.box_url = VM_BOX_URL
29+
2430
# Share an additional folder to the guest VM.
2531
#buildpack.vm.synced_folder "./data", "/vagrant_data"
2632

0 commit comments

Comments
 (0)