-
Notifications
You must be signed in to change notification settings - Fork 15
/
Vagrantfile
68 lines (52 loc) · 1.79 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# -*- mode: ruby -*-
# vi: set ft=ruby :
$name = "Walker Lee"
$synced_folder = {"#{ENV['HOME']}" => "/user",
"/Volumes/Transcend" => "/sdcard",
}
$script = <<SCRIPT
export HTTP_PROXY=http://doro.io:3128
echo 192.168.80.222 doro.io >> /etc/hosts
apt-get update
apt-get install -y python-software-properties apt-transport-https
sed -i 's#/archive.ubuntu.com/#/tw.archive.ubuntu.com/#' /etc/apt/sources.list
add-apt-repository -y ppa:fcwu-tw/ppa
# Add the repository to your APT sources
echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
# Then import the repository key
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
apt-get update
apt-get install -y lxc lxc-docker
apt-get install -y qdk2 debhelper devscripts fish zsh
apt-get upgrade
apt-get clean
# docker
sed -i '$ a \
DOCKER_OPTS="--bip=10.0.5.1/24 -H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock"' /etc/default/docker
service docker stop
ip link set docker0 down
brctl delbr docker0
service docker start
chmod +s /usr/bin/docker
sudo -u vagrant git clone https://github.com/walkerlee/dotfiles .dotfiles
SCRIPT
#$script = <<SCRIPT
#echo 'Hi, #{$name}'
#SCRIPT
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
# config.vm.network "forwarded_port", guest: 80, host: 8080
$synced_folder.each do |host, guest|
if Dir.exists?(host)
config.vm.synced_folder host, guest
end
end
config.vm.provider "virtualbox" do |vb|
vb.name = "qdk2"
vb.memory = 2048
vb.cpus = 2
end
config.vm.provision "shell", inline: $script, privileged: true
end