Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created September 23, 2023 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/2f0c166457a15643c3af560a681a50f9 to your computer and use it in GitHub Desktop.
Save bjoerntx/2f0c166457a15643c3af560a681a50f9 to your computer and use it in GitHub Desktop.
FROM mcr.microsoft.com/dotnet/aspnet:6.0-windowsservercore-ltsc2019
# Copy the application from folder "app" to "C:\app" on container machine
COPY app/ /app
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "vc_redist.x64.exe"; \
Start-Process "vc_redist.x64.exe" -ArgumentList "/passive" -wait -Passthru; \
Remove-Item -Force vc_redist.x64.exe;
WORKDIR /app
EXPOSE 80
ENTRYPOINT ["dotnet", "MyDockerTXApp.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment