The dotnetapp-current sample demonstrates how you can build and run the dotnetapp sample using the .NET Core Runtime 1.1.0 Docker image. It's a great option for trying the .NET Core 1.1 version. It is the same as the dotnetapp-prod image, except that it relies on a later .NET Core version.
The instructions assume that you already have .NET Core 1.1 and Git and Docker clients installed. They also assume you already know how to target Linux or Windows containers. Do try both image types. You need the latest Windows 10 or Windows Server 2016 to use Windows containers.
First, prepare your environment by cloning the repository and navigating to the sample:
git clone https://github.com/dotnet/dotnet-docker-samples/
cd dotnet-docker-samples/dotnetapp-current
Follow these steps to run the sample locally:
dotnet restore
dotnet run Hello .NET Core from Docker
Follow these steps to run this sample in a Linux container:
dotnet restore
dotnet publish -c Release -o out
docker build -t dotnetapp .
docker run dotnetapp Hello .NET Core from Docker
Follow these steps to run this sample in a Windows container:
dotnet restore
dotnet publish -c Release -o out
docker build -t dotnetapp -f Dockerfile.nano .
docker run dotnetapp Hello .NET Core from Docker