-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy pathDockerfile
22 lines (19 loc) · 997 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# escape=`
ARG REPO=mcr.microsoft.com/dotnet/runtime
FROM $REPO:8.0.13-windowsservercore-ltsc2019
# ASP.NET Core version
ENV ASPNET_VERSION=8.0.13
# Install ASP.NET Core Runtime
RUN powershell -Command `
$ErrorActionPreference = 'Stop'; `
$ProgressPreference = 'SilentlyContinue'; `
`
Invoke-WebRequest -OutFile aspnetcore.zip https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$Env:ASPNET_VERSION/aspnetcore-runtime-$Env:ASPNET_VERSION-win-x64.zip; `
$aspnetcore_sha512 = '2cf4a7dc531cdae0d244bbd745a051c431304db230630789e26273781c32e540ba92709e51ddfd17fccdc9879e1b209a3e08783475d9c4c4446dcc74709be5d8'; `
if ((Get-FileHash aspnetcore.zip -Algorithm sha512).Hash -ne $aspnetcore_sha512) { `
Write-Host 'CHECKSUM VERIFICATION FAILED!'; `
exit 1; `
}; `
`
tar -oxzf aspnetcore.zip -C $Env:ProgramFiles\dotnet ./shared/Microsoft.AspNetCore.App; `
Remove-Item -Force aspnetcore.zip