-
Notifications
You must be signed in to change notification settings - Fork 0
Execute locally
#Executing locally#
##Release 1.0.0## When RC1 and the nightly RC2 builds came out our version of Visual Studio only could kick start the full Net framework from the project settings (i.e. the launchSettings.json). However, this wasn't the target framework when running under Docker. There are 2 frameworks in the project.json. The first is for the full blown Net and the other is the NetStandardapp 1.5, specially the dnxcore50 platform. Just as an aside, We decided early on not to play around with Mono and looked solely at the slimmed down Asp Net Core. This section explains how to build, publish and run the project on a Windows Core platform and for Linux with Docker.
###Windows###
From Powershell change directories to the Five local repository and drop into the src\Five
folder. The older Asp Net Core tool chain ought to be installed if Visual Studio was upgraded to 2015. We tested Five with the 1.0.0-rc2-20221
nightly release of Asp coreclr. Use dnvm to either install or upgrade (e.g. dnvm upgrade -u -arch x64 -r coreclr
) to the latest runtime for Windows. Standing in the Five repository lets Nuget find the nightly line since the project ships with a Nuget.config file. dnvm will create an active alias so what the dnu and dnx tools use the correct version.
The dnu pack
helps us build NuGet packages for the Five project in a given directory:
dnu pack
--configuration Debug
--framework netstandardapp1.5
--out ..\..\artifacts\bin\<something else than Five, maybe Five-core>
The verbose output shows the location of resolved dependencies (which is helpful when debugging weird errors do to mismatching versions). Afterwards, the dnu publish
yields package that can be brought into memory with dnx:
dnu publish
-o <Some location, use a volume mounted into Docker>
--configuration Debug
--framework netstandardapp1.5
This creates a folder with following structure:
approot
logs
wwwroot
dnx web
ought to be run from the approot\src\Five
folder. Then the React sample client can be reached from localhost:5000
.
###Docker###
We make the assumption that the reader knows Docker. Our use of Docker is through the normal docker-machine
virtual box that most people recognize before the Beta for Windows came out. We used the older RC1 images then upgraded them from the command line in the Linux shell (docker exec -i -t <asp core image> /bin/bash
). Now the RC2 images are accessible from the Asp Net Core tool chain.
A container from RC1 would be defined like:
docker run
-t
--detach
--publish=5000:5000
--name Five
--volume=<use the same output folder from the dnx publish>:/app
microsoft/aspnet:1.0.0-rc1-update1-coreclr
Once inside the container (via the Bash shell), make sure to update the coreclr runtime with dnvm just like we did on Windows and then the Five project is started with dnx web
from the /app
mount point.
##Release 1.0.1## ##Windows##
##Docker##