-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvagrantfile
65 lines (54 loc) · 1.93 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
## Vagrantfile
Vagrant.configure("2") do |config|
# Box details
config.vm.box = 'ubuntu/xenial64'
config.ssh.forward_agent = true
#config.ssh.username = "ubuntu" # don't need anymore, username 'vagrant' would be used by default, see https://github.com/hashicorp/vagrant/issues/9416
config.vm.hostname = "dotnetcore.vm"
config.vm.synced_folder "./src", "/home/vagrant/src"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
# Fix for: "stdin: is not a tty"
# https://github.com/mitchellh/vagrant/issues/1673#issuecomment-28288042
config.ssh.shell = %{bash -c 'BASH_ENV=/etc/profile exec bash'}
# Plugins
#config.berkshelf.enabled = true
#config.omnibus.chef_version = :latest
# Network
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.network :private_network, ip: "10.0.15.10"
# Repositories
#apt_repository 'dotnet' do
# uri 'https://apt-mo.trafficmanager.net/repos/dotnet-release/'
# distribution 'xenial'
# components ['main']
#end
#node['dotnetcore']['package']['name'] = 'dotnet-dev-1.1.0-preview1-005077'
#node['dotnetcore']['apt_package_source'] = 'https://apt-mo.trafficmanager.net/repos/dotnet-release/'
# Chef solo provisioning
#config.vm.provision :chef_solo do |chef|
#chef.add_recipe "chef_nginx"
#chef.add_recipe "dotnetcore"
#chef.json = {
# "dotnetcore" => {
# "package" => {
# "name" => "dotnet-sdk-2.0.0"
# }
# }
#}
#end
config.vm.provision "shell", inline: <<-SHELL
export DEBIAN_FRONTEND=noninteractive
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install apt-transport-https -y
sudo apt-get update -y
sudo apt-get install dotnet-sdk-2.2 -y
SHELL
end