-
Notifications
You must be signed in to change notification settings - Fork 335
/
Copy pathDockerfile
36 lines (33 loc) · 1.58 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
35
36
# escape=`
FROM mcr.microsoft.com/windows/servercore:ltsc2016-amd64
ENV COMPLUS_NGenProtectedProcess_FeatureEnabled=0
RUN `
# Install .NET Fx 4.7.2
powershell -Command `
$ProgressPreference = 'SilentlyContinue'; `
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest `
-UseBasicParsing `
-Uri https://download.visualstudio.microsoft.com/download/pr/1f5af042-d0e4-4002-9c59-9ba66bcf15f6/089f837de42708daacaae7c04b7494db/ndp472-kb4054530-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
&& powershell -Command `
$ProgressPreference = 'SilentlyContinue'; `
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest `
-UseBasicParsing `
-Uri https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2025/01/windows10.0-kb5049993-x64_6a123d9d7dba130d2a5ebfaa38ce380680ff52ed.msu `
-OutFile patch.msu; `
&& mkdir patch `
&& expand patch.msu patch -F:* `
&& del patch.msu `
&& dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5049993-x64.cab `
&& rmdir /S /Q patch `
`
# ngen .NET Fx
&& %windir%\Microsoft.NET\Framework64\v4.0.30319\ngen update `
&& %windir%\Microsoft.NET\Framework\v4.0.30319\ngen update