-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathVagrantfile
40 lines (32 loc) · 1.36 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.hostname = 'dev'
config.vm.network "public_network"
config.vm.provision "shell", privileged: false, inline: <<-SHELL
set -e -x -u
sudo apt-get update
sudo apt-get install -y vim git build-essential openvswitch-switch bridge-utils
# Install Golang
wget --quiet https://storage.googleapis.com/golang/go1.9.1.linux-amd64.tar.gz
sudo tar -zxf go1.9.1.linux-amd64.tar.gz -C /usr/local/
echo 'export GOROOT=/usr/local/go' >> /home/ubuntu/.bashrc
echo 'export GOPATH=$HOME/go' >> /home/ubuntu/.bashrc
echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> /home/ubuntu/.bashrc
source /home/ubuntu/.bashrc
mkdir -p /home/ubuntu/go/src
rm -rf /home/ubuntu/go1.9.1.linux-amd64.tar.gz
# Install Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce
SHELL
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--cpus", 2]
# enable this when hosts up to 4
# v.customize ["modifyvm", :id, "--memory", 4096]
v.customize ['modifyvm', :id, '--nicpromisc1', 'allow-all']
end
end