For those of you not familiar. Cloud9 IDE is a web based IDE recently purchased by Amazon.
It uses the concept of per-project workspaces by allowing you to spin up a docker container as an individual workspace for each project you take on.
Cloud9 has several templates for your containers but they do not yet have support for .NET Core. This is a quick tutorial to show you how to do this.
Set up development environment
- Create a new workspace and choose the blank template (ubuntu Trusty at the time of writing).
sudo apt update
sudo apt install apt-transport-https
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
sudo apt update
sudo apt-get install dotnet-dev-1.0.4
Create and run a new MVC app
dotnet new mvc
ASPNETCORE_URLS="https://$IP:$PORT" dotnet run
You can now preview your running app by hitting the preview button next to the run button in the menu bar.