docker pull microsoft/dotnet:sdk
docker pull microsoft/aspnetcore:latest

#region  -------------- dotnet core build
#cleanup
docker rm -f dotnet-dev1
docker rmi itvisions/dotnet-dev
#build
cd H:\TFS\Demos\PowerShell\3_Einsatzgebiete\Docker\dotnet-dev
docker build -t itvisions/dotnet-dev .
docker run -d --name dotnet-dev -p 5000:5000 itvisions/dotnet-dev
#test
explorer http://localhost:5000
docker exec dotnet-dev dotnet --version #liefert z.B. 2.0.3
#endregion

#region -------------- Use multi-stage builds
#cleanup
docker rm -f dotnet-prod1
docker rmi itvisions/dotnet-prod
#build
cd H:\TFS\Demos\PowerShell\3_Einsatzgebiete\Docker\dotnet-prod
docker build -t itvisions/dotnet-prod .
docker run -d --name dotnet-prod1 -p 5001:5000 itvisions/dotnet-prod
#test
Get-containerImage | where RepoTags -like "*dotnet*" |ft 
Get-container | where Names -like "/dotnet*"  |ft
explorer http://localhost:5001

#endregion