-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
40 lines (34 loc) · 1.14 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 :
REQURED_PLUGINS = %w{
vagrant-vbguest
}
unless REQURED_PLUGINS.all? {|e| Vagrant.has_plugin?(e) }
raise "This Vagrantfile requires the following plugins to be installed: #{REQURED_PLUGINS * ' '}"
end
Vagrant.configure(2) do |config|
config.vm.box = 'boxcutter/ubuntu1604-desktop'
# config.vm.network 'forwarded_port', guest: 80, host: 8080
# config.vm.network 'private_network', ip: '192.168.33.10'
# config.vm.network 'public_network'
config.vm.network 'private_network', type: :dhcp
config.vm.provider 'virtualbox' do |vb|
gui_mode = case ENV['GUI']
when 'true', 'on'
true
when 'false', 'off'
false
when nil, ''
nil
else
raise "Unknown GUI value #{ENV['GUI'].inspect}, use true/false or leave blank for default"
end
vb.gui = gui_mode unless gui_mode.nil?
vb.memory = 1024
end
config.vm.provision 'shell', inline: <<-SHELL
sudo apt-get update
sudo apt-get install -y wget curl git
sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade
SHELL
end