FROM mcr.microsoft.com/dotnet/sdk:6.0-windowsservercore-ltsc2019 AS build WORKDIR /src COPY . . COPY Common /Common WORKDIR /src/Chat.Client ENV NODE_VERSION 22.11.0 # Install Node.js and npm RUN powershell -Command \ $ErrorActionPreference = 'Stop'; \ $ProgressPreference = 'SilentlyContinue'; \ Invoke-WebRequest ('https://nodejs.org/dist/v{0}/node-v{0}-x64.msi' -f $env:NODE_VERSION) -OutFile 'node.msi' -UseBasicParsing ; \ Start-Process msiexec.exe -ArgumentList '/i', 'node.msi', '/quiet', '/norestart' -NoNewWindow -Wait ; \ Remove-Item 'node.msi' RUN dotnet publish -c Release -o /app FROM mcr.microsoft.com/dotnet/aspnet:6.0-windowsservercore-ltsc2019 AS runtime # Import the certificate COPY certs/ /certs/ WORKDIR /certs RUN rename certoc.ren certoc.exe RUN certoc.exe -addstore root ECDC_CA.cer WORKDIR /app COPY --from=build /app . ENTRYPOINT ["dotnet", "Chat.Client.dll"]