-
Notifications
You must be signed in to change notification settings - Fork 330
/
Dockerfile
34 lines (30 loc) · 1.48 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.7
RUN powershell -Command `
$ProgressPreference = 'SilentlyContinue'; `
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest `
-UseBasicParsing `
-Uri "https://download.microsoft.com/download/D/D/3/DD35CC25-6E9C-484B-A746-C5BE0C923290/NDP47-KB3186497-x86-x64-AllOS-ENU.exe" `
-OutFile dotnet-framework-installer.exe `
&& start /w .\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/secu/2020/11/windows10.0-kb4586830-x64_30c6444c0319caa72579a4c59e2e93d756dc9f21.msu" `
-OutFile patch.msu; `
&& mkdir patch `
&& expand patch.msu patch -F:* `
&& del patch.msu `
&& dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-kb4586830-x64.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