-
Notifications
You must be signed in to change notification settings - Fork 330
/
Dockerfile
34 lines (30 loc) · 1.52 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# escape=`
FROM mcr.microsoft.com/windows/servercore:ltsc2016-amd64
# Install .NET 4.8
RUN powershell -Command `
$ProgressPreference = 'SilentlyContinue'; `
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest `
-UseBasicParsing `
-Uri "https://download.visualstudio.microsoft.com/download/pr/7afca223-55d2-470a-8edc-6a1739ae3252/abd170b4b0ec15ad0222a809b761a036/ndp48-x86-x64-allos-enu.exe" `
-OutFile dotnet-framework-installer.exe `
&& .\dotnet-framework-installer.exe /q `
&& del .\dotnet-framework-installer.exe `
&& powershell Remove-Item -Force -Recurse ${Env:TEMP}\*
# Apply latest patch
RUN powershell -Command `
$ProgressPreference = 'SilentlyContinue'; `
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest `
-UseBasicParsing `
-Uri "http://download.windowsupdate.com/c/msdownload/update/software/updt/2020/10/windows10.0-kb4585207-x64-ndp48_62f54bedd78999c5da431111d869fc9f273b991f.msu" `
-OutFile patch.msu; `
&& mkdir patch `
&& expand patch.msu patch -F:* `
&& del patch.msu `
&& dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-kb4585207-x64-ndp48.cab `
&& rmdir /S /Q patch
# ngen .NET Fx
ENV COMPLUS_NGenProtectedProcess_FeatureEnabled 0
RUN \Windows\Microsoft.NET\Framework64\v4.0.30319\ngen update `
&& \Windows\Microsoft.NET\Framework\v4.0.30319\ngen update