-
Notifications
You must be signed in to change notification settings - Fork 335
/
Copy pathDockerfile
41 lines (38 loc) · 1.84 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
37
38
39
40
41
# escape=`
FROM mcr.microsoft.com/windows/servercore:ltsc2016-amd64
ENV COMPLUS_NGenProtectedProcess_FeatureEnabled=0
RUN `
# Install .NET Fx 3.5
powershell -Command `
$ErrorActionPreference = 'Stop'; `
$ProgressPreference = 'SilentlyContinue'; `
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest `
-UseBasicParsing `
-Uri https://dotnetbinaries.blob.core.windows.net/dockerassets/microsoft-windows-netfx3-ltsc2016.zip `
-OutFile microsoft-windows-netfx3.zip; `
Expand-Archive microsoft-windows-netfx3.zip; `
&& del microsoft-windows-netfx3.zip `
&& dism /Online /Quiet /Add-Package /PackagePath:C:\microsoft-windows-netfx3\microsoft-windows-netfx3-ondemand-package.cab `
&& rmdir /S /Q microsoft-windows-netfx3 `
&& 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 `
&& %windir%\Microsoft.NET\Framework64\v2.0.50727\ngen update `
&& %windir%\Microsoft.NET\Framework\v2.0.50727\ngen update