Skip to content

Instantly share code, notes, and snippets.

@theparticleman
Created December 1, 2015 19:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theparticleman/f7440577c08dbd744a5c to your computer and use it in GitHub Desktop.
Save theparticleman/f7440577c08dbd744a5c to your computer and use it in GitHub Desktop.
.NET Core Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
$script = <<-SCRIPT
sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
apt-get update
apt-get install dotnet -y
SCRIPT
config.vm.provision "shell", inline: $script
end
@theparticleman
Copy link
Author

Once you vagrant up, do a vagrant ssh to ssh in to the VM. Once in, run the following commands:
dotnet new - this sets up a new "Hello World" project
dotnet restore - restores nuget packages
dotnet run - runs the project

You should get an output of "Hello world"

All the info comes from this site: https://dotnet.github.io/getting-started/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment