From a4a420611920e0328a89f5620f1d3c5d58ad424a Mon Sep 17 00:00:00 2001 From: Sourabh Shirhatti Date: Thu, 30 Aug 2018 14:05:15 -0700 Subject: [PATCH] Add sample for installing ANCM --- samples/aspnetcoremodule/Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 samples/aspnetcoremodule/Dockerfile diff --git a/samples/aspnetcoremodule/Dockerfile b/samples/aspnetcoremodule/Dockerfile new file mode 100644 index 0000000..fbe456b --- /dev/null +++ b/samples/aspnetcoremodule/Dockerfile @@ -0,0 +1,17 @@ +# escape=` + +FROM microsoft/iis + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] + +# +# Download and install IIS Administration API +RUN ` + New-Item -Type Directory C:\Setup | Out-Null ; ` + Invoke-WebRequest 'https://download.microsoft.com/download/6/E/B/6EBD972D-2E2F-41EB-9668-F73F5FDDC09C/dotnet-hosting-2.1.3-win.exe' -UserAgent '' -OutFile C:/setup/dotnet-hosting-2.1.3-win.exe ; ` + $process = start-process -Filepath C:/setup/dotnet-hosting-2.1.3-win.exe -ArgumentList @('/install', '/q', '/norestart', 'OPT_NO_RUNTIME=1', 'OPT_NO_SHAREDFX=1') -Wait -PassThru ; ` + ` + if ($process.ExitCode -ne 0) { ` + exit $process.ExitCode ; ` + } ` + Remove-Item -Force C:/setup/dotnet-hosting-2.1.3-win.exe