FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 AS build
SHELL ["powershell", "-Command"]
WORKDIR /src
# Copy project files first to leverage Docker cache for NuGet restore
COPY Quasar.Common/Quasar.Common.csproj Quasar.Common/Quasar.Common.csproj
COPY Quasar.Client/Quasar.Client.csproj Quasar.Client/Quasar.Client.csproj
# Restore NuGet packages
RUN Invoke-WebRequest -OutFile nuget.exe -UseBasicParsing https://dist.nuget.org/win-x86-commandline/latest/nuget.exe; \
& .\nuget.exe restore Quasar.Common/Quasar.Common.csproj; \
& .\nuget.exe restore Quasar.Client/Quasar.Client.csproj
# Copy the rest of the source code
COPY . .
# Build the client in Release configuration
RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release
# Runtime image
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019
WORKDIR /app
# Copy the built client and dependencies from the build stage
COPY --from=build /src/Quasar.Client/bin/Release /app
EXPOSE 4782
# Run the Windows desktop client (GUI will run in a Windows container session)
CMD ["Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 AS build
SHELL ["powershell", "-Command"]
WORKDIR /src
# Copy project files first to leverage Docker cache for NuGet restore
COPY Quasar.Common/Quasar.Common.csproj Quasar.Common/Quasar.Common.csproj
COPY Quasar.Client/Quasar.Client.csproj Quasar.Client/Quasar.Client.csproj
# Restore NuGet packages
RUN Invoke-WebRequest -OutFile nuget.exe -UseBasicParsing https://dist.nuget.org/win-x86-commandline/latest/nuget.exe; \
& .\nuget.exe restore Quasar.Common/Quasar.Common.csproj; \
& .\nuget.exe restore Quasar.Client/Quasar.Client.csproj
# Copy the rest of the source code
COPY . .
# Build the client in Release configuration
RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release
# Runtime image
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8 AS runtime
WORKDIR /app
# Copy the built client and dependencies from the build stage
COPY --from=build /src/Quasar.Client/bin/Release /app
EXPOSE 4782
# Run the Windows desktop client (GUI will run in a Windows container session)
CMD ["Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 AS build
SHELL ["powershell", "-Command"]
WORKDIR /src
# Copy project files first to leverage Docker cache for NuGet restore
COPY Quasar.Common/Quasar.Common.csproj Quasar.Common/Quasar.Common.csproj
COPY Quasar.Client/Quasar.Client.csproj Quasar.Client/Quasar.Client.csproj
# Restore NuGet packages
RUN if(!(Test-Path nuget.exe)) { Invoke-WebRequest -OutFile nuget.exe -UseBasicParsing https://dist.nuget.org/win-x86-commandline/latest/nuget.exe }
RUN .\nuget.exe restore Quasar.Common/Quasar.Common.csproj; .\nuget.exe restore Quasar.Client/Quasar.Client.csproj
# Copy the rest of the source code
COPY . .
# Build the client in Release configuration
RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release
# Runtime image
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 AS runtime
WORKDIR /app
# Copy the built client and dependencies from the build stage
COPY --from=build /src/Quasar.Client/bin/Release /app
EXPOSE 4782
# Run the Windows desktop client (GUI will run in a Windows container session)
CMD ["Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 AS build
SHELL ["powershell", "-Command"]
WORKDIR /src
# Copy projects for restore first to leverage caching
COPY Quasar.Common/Quasar.Common.csproj Quasar.Common/Quasar.Common.csproj
COPY Quasar.Client/Quasar.Client.csproj Quasar.Client/Quasar.Client.csproj
# Restore NuGet packages
RUN if(!(Test-Path nuget.exe)) { Invoke-WebRequest -OutFile nuget.exe -UseBasicParsing https://dist.nuget.org/win-x86-commandline/latest/nuget.exe }
RUN .\nuget.exe restore Quasar.Common/Quasar.Common.csproj; .\nuget.exe restore Quasar.Client/Quasar.Client.csproj
# Copy the rest of the source code
COPY . .
# Build the client in Release configuration
RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release
# Runtime image
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8 AS runtime
WORKDIR /app
# Copy built output
COPY --from=build /src/Quasar.Client/bin/Release /app
EXPOSE 4782
CMD ["Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 AS build
SHELL ["powershell", "-Command"]
WORKDIR /src
# Copy project files for NuGet restore first to leverage caching
COPY Quasar.Common/Quasar.Common.csproj Quasar.Common/Quasar.Common.csproj
COPY Quasar.Client/Quasar.Client.csproj Quasar.Client/Quasar.Client.csproj
# Restore NuGet packages
RUN if(!(Test-Path nuget.exe)) { Invoke-WebRequest -OutFile nuget.exe -UseBasicParsing https://dist.nuget.org/win-x86-commandline/latest/nuget.exe }
RUN .\nuget.exe restore Quasar.Common/Quasar.Common.csproj; .\nuget.exe restore Quasar.Client/Quasar.Client.csproj
# Copy the rest of the source code
COPY . .
# Build the client in Release configuration
RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release
# Runtime image
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 AS runtime
WORKDIR /app
# Copy built output from build stage
COPY --from=build /src/Quasar.Client/bin/Release /app
EXPOSE 4782
CMD ["Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 AS build
SHELL ["powershell", "-Command"]
WORKDIR /src
# Copy project files first to leverage Docker cache for NuGet restore
COPY Quasar.Common/Quasar.Common.csproj Quasar.Common/Quasar.Common.csproj
COPY Quasar.Client/Quasar.Client.csproj Quasar.Client/Quasar.Client.csproj
# Restore NuGet packages
RUN if(!(Test-Path nuget.exe)) { Invoke-WebRequest -OutFile nuget.exe -UseBasicParsing https://dist.nuget.org/win-x86-commandline/latest/nuget.exe }
RUN & .\nuget.exe restore Quasar.Common/Quasar.Common.csproj; & .\nuget.exe restore Quasar.Client/Quasar.Client.csproj
# Copy the rest of the source code
COPY . .
# Build the client in Release configuration
RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release
# Runtime image
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8 AS runtime
WORKDIR /app
# Copy built output from build stage
COPY --from=build /src/Quasar.Client/bin/Release /app
EXPOSE 4782
CMD ["Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 AS build
SHELL ["powershell", "-Command"]
WORKDIR /src
# Copy project files for NuGet restore
COPY Quasar.Common/Quasar.Common.csproj Quasar.Common/Quasar.Common.csproj
COPY Quasar.Client/Quasar.Client.csproj Quasar.Client/Quasar.Client.csproj
# Restore NuGet packages
RUN if(!(Test-Path nuget.exe)) { Invoke-WebRequest -OutFile nuget.exe -UseBasicParsing https://dist.nuget.org/win-x86-commandline/latest/nuget.exe }
RUN .\nuget.exe restore Quasar.Common/Quasar.Common.csproj; .\nuget.exe restore Quasar.Client/Quasar.Client.csproj
# Copy the rest of the source code
COPY . .
# Build the client in Release configuration
RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release
# Runtime image
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 AS runtime
WORKDIR /app
# Copy built output
COPY --from=build /src/Quasar.Client/bin/Release /app
EXPOSE 4782
CMD ["Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 AS build
SHELL ["powershell", "-Command"]
WORKDIR /src
# Copy project files first to leverage Docker cache
COPY Quasar.Common/Quasar.Common.csproj Quasar.Common/Quasar.Common.csproj
COPY Quasar.Client/Quasar.Client.csproj Quasar.Client/Quasar.Client.csproj
# Restore NuGet packages
RUN if(!(Test-Path nuget.exe)) { Invoke-WebRequest -OutFile nuget.exe -UseBasicParsing https://dist.nuget.org/win-x86-commandline/latest/nuget.exe }
RUN .\nuget.exe restore Quasar.Common/Quasar.Common.csproj; .\nuget.exe restore Quasar.Client/Quasar.Client.csproj
# Copy the rest of the source code
COPY . .
# Build the client in Release configuration
RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release
# Runtime image
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 AS runtime
WORKDIR /app
# Copy built output
COPY --from=build /src/Quasar.Client/bin/Release /app
EXPOSE 4782
CMD ["Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022 # Use PowerShell as the default shell for Windows containers SHELL ["powershell", "-Command"] WORKDIR C:\src COPY . . # Restore NuGet packages for the client project and then build in Release configuration RUN msbuild Quasar.Client\Quasar.Client.csproj /t:Restore /p:Configuration=Release RUN msbuild Quasar.Client\Quasar.Client.csproj /p:Configuration=Release # Entry point: run the built client executable CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
Concerns: No Dockerfile found at repo root
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 # Use PowerShell as the default shell for Windows containers SHELL ["powershell", "-Command"] WORKDIR C:\src COPY . . # Restore NuGet packages and build in Release configuration RUN msbuild Quasar.Client\Quasar.Client.csproj /t:Restore /p:Configuration=Release RUN msbuild Quasar.Client\Quasar.Client.csproj /p:Configuration=Release # Entry point: run the built client executable CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 SHELL ["powershell", "-Command"] WORKDIR C:\src COPY . . # Restore NuGet packages and build in Release configuration RUN msbuild Quasar.Client\\Quasar.Client.csproj /t:Restore /p:Configuration=Release RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: run the built client executable CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 SHELL ["powershell", "-Command"] WORKDIR C:\src COPY . . # Restore NuGet packages and build in Release configuration RUN msbuild Quasar.Client\\Quasar.Client.csproj /t:Restore /p:Configuration=Release RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: run the built client executable CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
FROM microsoft/dotnet-framework/sdk:4.8-windowsservercore-ltsc2019 SHELL ["powershell", "-Command"] WORKDIR C:\\src COPY . . # Restore NuGet packages and build in Release configuration RUN msbuild Quasar.Client\\Quasar.Client.csproj /t:Restore /p:Configuration=Release RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: run the built client executable CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 SHELL ["powershell", "-Command"] WORKDIR C:\\src COPY . . # Restore NuGet packages and build in Release configuration RUN msbuild Quasar.Client\\Quasar.Client.csproj /t:Restore /p:Configuration=Release RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: run the built client executable CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022 # Windows container base for building a .NET Framework Windows Forms app WORKDIR C:\src # Copy all source code into the container COPY . . # Build the Quasar client in Release configuration RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: execute the built client CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
FROM microsoft/dotnet-framework/sdk:4.8-windowsservercore-ltsc2019 # Windows container base for building a .NET Framework Windows Forms app WORKDIR C:\src # Copy all source code into the container COPY . . # Restore NuGet packages and build in Release configuration RUN msbuild Quasar.Client\\Quasar.Client.csproj /t:Restore /p:Configuration=Release RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: execute the built client CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 # Windows container base for building a .NET Framework Windows Forms app WORKDIR C:\\src # Copy all source code into the container COPY . . # Build the Quasar client in Release configuration RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: execute the built client CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022 # Windows container base for building a .NET Framework Windows Forms app SHELL ["powershell", "-Command"] WORKDIR C:\\src COPY . . # Build the Quasar client in Release configuration RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: execute the built client CMD ["C:\\src\\bin\\Release\\Client.exe"]
FROM microsoft/dotnet-framework-sdk:4.8-windowsservercore-ltsc2019 WORKDIR C:\src COPY . . # Restore and build the Quasar client RUN msbuild Quasar.Client\\Quasar.Client.csproj /t:Restore RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: run the built client CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
microsoft/dotnet-framework-sdk - Docker Image https://hub.docker.com/r/microsoft/dotnet-framework-sdk We update the supported .NET Framework images within 12 hours of any updates to their base images (e.g. … Official .NET Docker images - .NET | Microsoft Learn https://learn.microsoft.com/en-us/dotnet/architecture/microservices/net-core-net-framework-containers/official-net-docker-images dotnet-framework-docker/src/sdk/4.8/windowsserv… https://github.com/microsoft/dotnet-framework-docker/blob/main/src/sdk/4.8/windowsservercore-ltsc2019/Dockerfile The repo for the official docker images for .NET Framework on Windows Server Core. - dotnet-framework … .NET Framework 4.8 installation on Windows Docker image servercor… https://stackoverflow.com/questions/73372945/net-framework-4-8-installation-on-windows-docker-image-servercoreltsc2019 Aug 16, 2022 · I'm trying to build a docker image with .NET Framework 4.8. The Docker Windows image that I'm using is … Microsoft Artifact Registry https://mcr.microsoft.com/en-us/product/dotnet/framework/runtime/about This image contains the .NET Framework runtimes and libraries and is optimized for running .NET Framework apps in …
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 WORKDIR C:\src COPY . . # Build the Quasar client in Release configuration RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: run the built client CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
Concerns: No Dockerfile found at repo root
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 WORKDIR C:\src COPY . . # Restore NuGet packages and build Quasar.Client in Release configuration RUN msbuild Quasar.Client\\Quasar.Client.csproj /t:Restore RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: run the built client CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 # Windows container base for building a .NET Framework Windows Forms app WORKDIR C:\src # Copy all source code into the container COPY . . # Build the Quasar client in Release configuration RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: run the built client CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 SHELL ["powershell", "-Command"] WORKDIR C:\src COPY . . # Restore NuGet packages and build the Quasar client in Release mode RUN msbuild Quasar.Client\\Quasar.Client.csproj /t:Restore RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point to run the built client CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 WORKDIR C:\\src COPY . . # Restore NuGet packages and build in Release configuration RUN msbuild Quasar.Client\\Quasar.Client.csproj /t:Restore RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: run the built client CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 WORKDIR C:\src COPY . . # Restore NuGet packages and build in Release configuration RUN msbuild Quasar.Client\\Quasar.Client.csproj /t:Restore RUN msbuild Quasar.Client\\Quasar.Client.csproj /p:Configuration=Release # Entry point: run the built client CMD ["C:\\src\\Quasar.Client\\bin\\Release\\Client.exe"]
# Build stage: use Windows .NET Framework SDK to restore and build the client FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 AS build WORKDIR /src # Copy project files COPY Quasar.Common/Quasar.Common.csproj Quasar.Common/Quasar.Common.csproj COPY Quasar.Client/Quasar.Client.csproj Quasar.Client/Quasar.Client.csproj COPY Quasar.Common/ Quasar.Common/ COPY Quasar.Client/ Quasar.Client/ # Restore and build Release RUN msbuild Quasar.Client/Quasar.Client.csproj /t:Restore RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release # Runtime stage: run a Windows .NET Framework app FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 WORKDIR /app # Copy built binaries from the build stage COPY --from=build /src/Quasar.Client/bin/Release/ . # Entry point ENTRYPOINT ["Client.exe"]
# Build stage: use Windows .NET Framework SDK to restore and build the client FROM microsoft/dotnet-framework-sdk:4.8-windowsservercore-ltsc2019 AS build WORKDIR /src # Copy project files COPY Quasar.Client/Quasar.Client.csproj Quasar.Client/Quasar.Client.csproj COPY Quasar.Common/Quasar.Common.csproj Quasar.Common/Quasar.Common.csproj COPY Quasar.Client/ Quasar.Client/ COPY Quasar.Common/ Quasar.Common/ # Restore and build Release RUN msbuild Quasar.Client/Quasar.Client.csproj /t:Restore RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release # Runtime stage: run a Windows .NET Framework app FROM microsoft/dotnet-framework-runtime:4.8-windowsservercore-ltsc2019 WORKDIR /app # Copy built binaries from the build stage COPY --from=build /src/Quasar.Client/bin/Release/Client.exe ./Client.exe # Entry point ENTRYPOINT ["Client.exe"]
# Build stage: compile the Quasar client for Windows (.NET Framework) using Windows Server Core FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 AS build WORKDIR C:\src # Copy project references COPY Quasar.Common/Quasar.Common.csproj Quasar.Common/Quasar.Common.csproj COPY Quasar.Client/Quasar.Client.csproj Quasar.Client/Quasar.Client.csproj # Copy sources for restore/build COPY Quasar.Common/ Quasar.Common/ COPY Quasar.Client/ Quasar.Client/ # Restore and build RUN msbuild Quasar.Common/Quasar.Common.csproj /t:Restore RUN msbuild Quasar.Client/Quasar.Client.csproj /t:Restore RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release # Runtime stage: run a Windows .NET Framework app FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 WORKDIR C:\src # Copy built binaries from the build stage COPY --from=build C:\src\Quasar.Client\bin\Release\ . # Entry point to run the client ENTRYPOINT ["Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 AS build WORKDIR /src # Copy csproj and source for Quasar.Common and Quasar.Client COPY Quasar.Common/Quasar.Common.csproj Quasar.Common/Quasar.Common.csproj COPY Quasar.Client/Quasar.Client.csproj Quasar.Client/Quasar.Client.csproj COPY Quasar.Common/ Quasar.Common/ COPY Quasar.Client/ Quasar.Client/ # Restore and build RUN msbuild Quasar.Client/Quasar.Client.csproj /t:Restore RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 WORKDIR /app COPY --from=build /src/Quasar.Client/bin/Release/ ./ ENTRYPOINT ["Client.exe"]
FROM mscorlib/sdk:4.8-windowsservercore-ltsc2019
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 AS build WORKDIR C:\src COPY . . # Restore NuGet packages and build the client project (which pulls Quasar.Common via ProjectReference) RUN nuget restore Quasar.Client/Quasar.Client.csproj RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release # Stage 2: Runtime image with the built Client FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 AS runtime WORKDIR C:\app # Copy the built binaries from the build stage COPY --from=build C:\src\bin\Release\ . CMD ["Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 AS build WORKDIR C:\src COPY . . # Restore NuGet packages and build the client project (which pulls Quasar.Common via ProjectReference) RUN nuget restore Quasar.Client/Quasar.Client.csproj RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release # Stage 2: Runtime image with the built Client FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 AS runtime WORKDIR C:\app # Copy the built binaries from the build stage COPY --from=build C:\src\bin\Release\ . CMD ["Client.exe"]
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 AS build WORKDIR C:\src COPY . . # Restore NuGet packages and build the client project (which pulls Quasar.Common via ProjectReference) RUN nuget restore Quasar.Client/Quasar.Client.csproj RUN msbuild Quasar.Client/Quasar.Client.csproj /p:Configuration=Release # Stage 2: Runtime image with the built Client FROM mcr.microsoft.com/dotnet/framework/runtime:4.8 AS runtime WORKDIR C:\app # Copy the built binaries from the build stage COPY --from=build C:\src\bin\Release\ . CMD ["Client.exe"]