-
Notifications
You must be signed in to change notification settings - Fork 17
/
Vagrantfile
26 lines (21 loc) · 905 Bytes
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "bare-metal-gophers-dev" do |v|
end
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--usb", "on"]
vb.customize ["modifyvm", :id, "--usbehci", "off"]
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
config.vm.box = "minimal/xenial64"
config.vm.synced_folder "./", "/home/vagrant/bare-metal-gophers"
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y nasm gccgo xorriso
[ ! -d "/usr/local/go" ] && wget -qO- https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz | tar xz -C /usr/local
echo "export GOROOT=/usr/local/go" > /etc/profile.d/go.sh
echo "export GOBIN=/usr/local/go/bin" >> /etc/profile.d/go.sh
echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile.d/go.sh
SHELL
end