Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active September 2, 2022 09:58
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/c2e0f7418d383370cf02eb5695f77910 to your computer and use it in GitHub Desktop.
Save bjoerntx/c2e0f7418d383370cf02eb5695f77910 to your computer and use it in GitHub Desktop.
FROM mcr.microsoft.com/windows:ltsc2019
# Copy folders
ADD ./SyncService/ /SyncService/
ADD ./BackendApp/ /BackendApp
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# Download and install ASP.NET Core 6.0 Runtime (v6.0.8) - Windows Hosting Bundle
RUN Invoke-WebRequest -OutFile dotnet-hosting-6.0.8-win.exe "https://download.visualstudio.microsoft.com/download/pr/c5e0609f-1db5-4741-add0-a37e8371a714/1ad9c59b8a92aeb5d09782e686264537/dotnet-hosting-6.0.8-win.exe"; \
Start-Process "dotnet-hosting-6.0.8-win.exe" -ArgumentList "/passive" -wait -Passthru; \
Remove-Item -Force dotnet-hosting-6.0.8-win.exe;
# Download and install Visual C++ Redistributable Packages for Visual Studio 2013
RUN Invoke-WebRequest -OutFile vcredist_x64.exe "https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe"; \
Start-Process "vcredist_x64.exe" -ArgumentList "/passive" -wait -Passthru; \
Remove-Item -Force vcredist_x64.exe;
## Install the TX Text Control Service
RUN New-Service -Name "TXBackend" -BinaryPathName '"C:\SyncService\TXTextControl.Web.Server.exe"';
WORKDIR /BackendApp
EXPOSE 80
# Start ASP.NET Core application - add your DLL name here
ENTRYPOINT ["dotnet", "BackendApp.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment