-
Notifications
You must be signed in to change notification settings - Fork 335
/
Copy pathDockerfile
31 lines (28 loc) · 1.67 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
# escape=`
FROM mcr.microsoft.com/windows/servercore:ltsc2022-amd64
ENV `
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINER=true `
COMPLUS_RUNNING_IN_CONTAINER=1 `
COMPLUS_NGenProtectedProcess_FeatureEnabled=0
RUN `
# Install .NET Fx 4.8.1
curl -fSLo dotnet-framework-installer.exe https://download.visualstudio.microsoft.com/download/pr/6f083c7e-bd40-44d4-9e3f-ffba71ec8b09/3951fd5af6098f2c7e8ff5c331a0679c/ndp481-x86-x64-allos-enu.exe `
&& .\dotnet-framework-installer.exe /q `
&& del .\dotnet-framework-installer.exe `
&& powershell Remove-Item -Force -Recurse ${Env:TEMP}\* `
`
# Apply latest patch
&& curl -fSLo patch.msu https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2024/12/windows10.0-kb5049625-x64-ndp481_cced48b8de758c3d5407c0fc62f198fca222c5b4.msu `
&& mkdir patch `
&& expand patch.msu patch -F:* `
&& del /F /Q patch.msu `
&& dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5049625-x64-ndp481.cab `
&& rmdir /S /Q patch `
`
# Ngen top of assembly graph to optimize a set of frequently used assemblies
&& %windir%\Microsoft.NET\Framework64\v4.0.30319\ngen install "Microsoft.PowerShell.Utility.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" `
# To optimize 32-bit assemblies, uncomment the next line
# && %windir%\Microsoft.NET\Framework\v4.0.30319\ngen install "Microsoft.PowerShell.Utility.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" `
&& %windir%\Microsoft.NET\Framework64\v4.0.30319\ngen update `
&& %windir%\Microsoft.NET\Framework\v4.0.30319\ngen update