|
| 1 | +# escape=` |
| 2 | + |
| 3 | +FROM microsoft/dotnet-framework:4.7.2-runtime-windowsservercore-ltsc2016 |
| 4 | + |
| 5 | +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] |
| 6 | + |
| 7 | +ENV COMPLUS_NGenProtectedProcess_FeatureEnabled 0 |
| 8 | + |
| 9 | +RUN Add-WindowsFeature Web-Server; ` |
| 10 | + Add-WindowsFeature NET-Framework-45-ASPNET; ` |
| 11 | + Add-WindowsFeature Web-Asp-Net45; ` |
| 12 | + Remove-Item -Recurse C:\inetpub\wwwroot\*; ` |
| 13 | + Invoke-WebRequest -Uri https://dotnetbinaries.blob.core.windows.net/servicemonitor/2.0.1.3/ServiceMonitor.exe -OutFile C:\ServiceMonitor.exe |
| 14 | + |
| 15 | +#download Roslyn nupkg and ngen the compiler binaries |
| 16 | +RUN Invoke-WebRequest https://api.nuget.org/packages/microsoft.net.compilers.2.3.1.nupkg -OutFile c:\microsoft.net.compilers.2.3.1.zip ; ` |
| 17 | + Expand-Archive -Path c:\microsoft.net.compilers.2.3.1.zip -DestinationPath c:\RoslynCompilers ; ` |
| 18 | + Remove-Item c:\microsoft.net.compilers.2.3.1.zip -Force ; ` |
| 19 | + &C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe update ; ` |
| 20 | + &C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe update ; ` |
| 21 | + &C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe install c:\RoslynCompilers\tools\csc.exe /ExeConfig:c:\RoslynCompilers\tools\csc.exe | ` |
| 22 | + &C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe install c:\RoslynCompilers\tools\vbc.exe /ExeConfig:c:\RoslynCompilers\tools\vbc.exe | ` |
| 23 | + &C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe install c:\RoslynCompilers\tools\VBCSCompiler.exe /ExeConfig:c:\RoslynCompilers\tools\VBCSCompiler.exe | ` |
| 24 | + &C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe install c:\RoslynCompilers\tools\csc.exe /ExeConfig:c:\RoslynCompilers\tools\csc.exe | ` |
| 25 | + &C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe install c:\RoslynCompilers\tools\vbc.exe /ExeConfig:c:\RoslynCompilers\tools\vbc.exe | ` |
| 26 | + &C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe install c:\RoslynCompilers\tools\VBCSCompiler.exe /ExeConfig:c:\RoslynCompilers\tools\VBCSCompiler.exe ; |
| 27 | + |
| 28 | +ENV ROSLYN_COMPILER_LOCATION c:\\RoslynCompilers\\tools |
| 29 | + |
| 30 | +EXPOSE 80 |
| 31 | + |
| 32 | +ENTRYPOINT ["C:\\ServiceMonitor.exe", "w3svc"] |
0 commit comments