Created
December 2, 2015 23:00
-
-
Save theparticleman/8eace8f96d1d078251b7 to your computer and use it in GitHub Desktop.
ASP.NET 5 with .NET Core Vagrant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.network :private_network, ip: "192.168.33.15" | |
$script = <<-SCRIPT | |
reset | |
sudo apt-get update | |
sudo apt-get install unzip curl -y | |
curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh | |
sudo apt-get install libunwind8 gettext libssl-dev libcurl4-openssl-dev zlib1g libicu-dev uuid-dev -y | |
dnvm upgrade -r coreclr | |
sudo apt-get install make automake libtool curl -y | |
curl -sSL https://github.com/libuv/libuv/archive/v1.4.2.tar.gz | sudo tar zxfv - -C /usr/local/src | |
cd /usr/local/src/libuv-1.4.2 | |
sudo sh autogen.sh | |
sudo ./configure | |
sudo make | |
sudo make install | |
sudo rm -rf /usr/local/src/libuv-1.4.2 && cd ~/ | |
sudo ldconfig | |
sudo apt-get install git -y | |
cd ~ | |
git clone https://github.com/aspnet/Home.git | |
SCRIPT | |
config.vm.provision "shell", inline: $script, privileged: false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Once you
vagrant up
andvagrant ssh
in to the box, you can do the following to start a web site:cd ~/Home/samples/1.0.0-rc1-final/HelloWeb
- switch to the directory where one of the samples livesdnu restore
- restore nuget packagesdnx web
- start up the web serverYou may want to make a change in
project.json
so that the web site will be accessible outside of the VM. If so, change thehttp://localhost:5004
url to something likehttp://192.168.33.15:5004
. You should then be able to access the website from your host machine.