Last active
April 13, 2018 00:35
-
-
Save yizhang82/d55cff504ae807e8a79e04e56856817a to your computer and use it in GitHub Desktop.
Asp.NET core runtime environment on Windows Server Core 1709 on .NET Core 2.0.6 runtime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# escape=` | |
# Installer image | |
FROM microsoft/windowsservercore:1709 AS installer-env | |
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] | |
# Retrieve the runtime store | |
RUN @('2.0.0', '2.0.3', '2.0.5', '2.0.6') | % { ` | |
$downloadUrl = \"https://dist.asp.net/runtimestore/${_}/win-x64/aspnetcore.runtimestore.zip\"; ` | |
Write-Host \"Downloading and extracting $downloadUrl\"; ` | |
Invoke-WebRequest $downloadUrl -OutFile cache.zip; ` | |
Expand-Archive cache.zip -DestinationPath RuntimeStore; ` | |
Remove-Item -Force cache.zip; ` | |
} | |
# Runtime image | |
FROM yizhang82/dotnet:2.0.6 | |
# Set up network | |
ENV ASPNETCORE_URLS http://+:80 | |
ENV ASPNETCORE_PKG_VERSION 2.0.6 | |
# Set up the runtime store | |
COPY --from=installer-env ["RuntimeStore", "C:\\Program Files\\dotnet"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment