Created
June 24, 2020 10:30
-
-
Save bjoerntx/1e45da15fb033155cb0023d85f2b787b to your computer and use it in GitHub Desktop.
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
# https://hub.docker.com/_/microsoft-windows-servercore | |
# "ltsc2016" to get fonts installed | |
# Server Core 2019 is shipped without fonts | |
FROM mcr.microsoft.com/windows/servercore:ltsc2016 | |
# Copy the application from folder "app" to "C:\app" on container machine | |
COPY app/ /app | |
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] | |
# Download and install Visual C++ Redistributable Packages for Visual Studio 2013 | |
RUN Invoke-WebRequest -OutFile vc_redist.x64.exe https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe; \ | |
Start-Process "vc_redist.x64.exe" -ArgumentList "/passive" -wait -Passthru; \ | |
del vc_redist.x64.exe | |
# Install ASP.NET Core Runtime | |
# Checksum and direct link from: https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-aspnetcore-3.1.5-windows-hosting-bundle-installer | |
RUN Invoke-WebRequest -OutFile dotnet-hosting-3.1.0-win.exe https://download.visualstudio.microsoft.com/download/pr/fa3f472e-f47f-4ef5-8242-d3438dd59b42/9b2d9d4eecb33fe98060fd2a2cb01dcd/dotnet-hosting-3.1.0-win.exe; \ | |
Start-Process "dotnet-hosting-3.1.0-win.exe" -ArgumentList "/passive" -wait -Passthru; \ | |
Remove-Item -Force dotnet-hosting-3.1.0-win.exe | |
WORKDIR /app | |
EXPOSE 80 | |
ENTRYPOINT ["dotnet", "myDotnetCoreApp.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment