FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env WORKDIR /MCTG ENV DOTNET_EnableDiagnostics=0 COPY . ./ RUN dotnet restore CI-CD.slnf RUN dotnet publish CI-CD.slnf -c Release -o out --no-restore # Build runtime image FROM mcr.microsoft.com/dotnet/runtime:7.0 WORKDIR /MCTG COPY --from=build-env /MCTG/out . ENTRYPOINT ["dotnet", "ConsoleApp.dll"]