Skip to content

Commit 46c9be5

Browse files
authored
Install .NET framework (#257)
1 parent 600ffff commit 46c9be5

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

windows/package-i686/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ FROM mcr.microsoft.com/windows/servercore:$WIN_VERSION
3737

3838
COPY --from=MSYS2_download C:/msys64 C:/msys64
3939

40+
# Install .NET runtime for i686
41+
ARG DOTNET_URL="https://download.visualstudio.microsoft.com/download/pr/c2083daf-6d33-404f-a7d6-dd3bb012a945/e241d0aff000f63ef8a49c3c7da08087/dotnet-runtime-8.0.8-win-x86.exe"
42+
ARG DOTNET_EXE="C:/windows/temp/dotnet-runtime.exe"
43+
RUN powershell -Command "\
44+
Invoke-WebRequest -Uri '%DOTNET_URL%' -OutFile '%DOTNET_EXE%' -ErrorAction Stop ; \
45+
Start-Process '%DOTNET_EXE%' -Wait -ArgumentList '/install', '/quiet', '/norestart' ; \
46+
Remove-Item '%DOTNET_EXE%'"
47+
4048
# Download Windows 11 SDK (10.0.22621.2428) and install only `signtool.exe`
4149
ARG SDK_URL="https://go.microsoft.com/fwlink/?linkid=2250105"
4250
ARG SDK_EXE="C:/windows/temp/winsdksetup.exe"

windows/package-x86_64/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ FROM mcr.microsoft.com/windows/servercore:$WIN_VERSION
3232

3333
COPY --from=MSYS2_download C:/msys64 C:/msys64
3434

35+
# Install .NET runtime for x86_64
36+
ARG DOTNET_URL="https://download.visualstudio.microsoft.com/download/pr/cc913baa-9bce-482e-bdfc-56c4b6fafd10/e3f24f2ab2fc02b395c1b67f5193b8d1/dotnet-runtime-8.0.8-win-x64.exe"
37+
ARG DOTNET_EXE="C:/windows/temp/dotnet-runtime.exe"
38+
RUN powershell -Command "\
39+
Invoke-WebRequest -Uri '%DOTNET_URL%' -OutFile '%DOTNET_EXE%' -ErrorAction Stop ; \
40+
Start-Process '%DOTNET_EXE%' -Wait -ArgumentList '/install', '/quiet', '/norestart' ; \
41+
Remove-Item '%DOTNET_EXE%'"
42+
3543
# Download Windows 11 SDK (10.0.22621.2428) and install only `signtool.exe`
3644
ARG SDK_URL="https://go.microsoft.com/fwlink/?linkid=2250105"
3745
ARG SDK_EXE="C:/windows/temp/winsdksetup.exe"

0 commit comments

Comments
 (0)