-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy pathDockerfile
32 lines (25 loc) · 1.31 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
# escape=`
ARG REPO=mcr.microsoft.com/dotnet/runtime
# Installer image
FROM mcr.microsoft.com/windows/servercore:ltsc2025-amd64 AS installer
# Install ASP.NET Core Runtime
RUN powershell -Command `
$ErrorActionPreference = 'Stop'; `
$ProgressPreference = 'SilentlyContinue'; `
`
$aspnetcore_version = '10.0.0-preview.3.25172.1'; `
Invoke-WebRequest -OutFile aspnetcore.zip https://ci.dot.net/public/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-win-x64.zip; `
$aspnetcore_sha512 = '0bcda427a08422bda3d0331b99742fd076abee2e22c994dcd4b4a84534f3e6080dbb63a69b415b8a0a5681d34be38b80366addbf3a5446fc25faca9e2a88eb8e'; `
if ((Get-FileHash aspnetcore.zip -Algorithm sha512).Hash -ne $aspnetcore_sha512) { `
Write-Host 'CHECKSUM VERIFICATION FAILED!'; `
exit 1; `
}; `
`
mkdir dotnet/shared/Microsoft.AspNetCore.App; `
tar -oxzf aspnetcore.zip -C dotnet ./shared/Microsoft.AspNetCore.App; `
Remove-Item -Force aspnetcore.zip
# ASP.NET Core image
FROM $REPO:10.0.0-preview.3-windowsservercore-ltsc2025
# ASP.NET Core version
ENV ASPNET_VERSION=10.0.0-preview.3.25172.1
COPY --from=installer ["/dotnet/shared/Microsoft.AspNetCore.App", "/Program Files/dotnet/shared/Microsoft.AspNetCore.App"]