FROM 194.5.195.53:32082/dotnet/sdk:9.0 AS build WORKDIR /src # Copy NuGet config and project file COPY ["FrontOffice.Main/NuGet.config", "NuGet.config"] COPY ["FrontOffice.Main/FrontOffice.Main.csproj", "FrontOffice.Main/"] # Restore dependencies RUN dotnet restore "FrontOffice.Main/FrontOffice.Main.csproj" --configfile NuGet.config # Copy all source code COPY . . # Build and publish WORKDIR "/src/FrontOffice.Main" RUN dotnet publish "FrontOffice.Main.csproj" -c Release -o /app/publish # Runtime stage - aspnet for Blazor Server FROM 194.5.195.53:32082/dotnet/aspnet:9.0 AS runtime WORKDIR /app COPY --from=build /app/publish . ENV ASPNETCORE_URLS=http://+:80 ENV GW_URL=https://cms.se.kbs1.ir # For Kubernetes staging, override GW_URL/GwUrl to http://cms-svc:8080 via deployment env vars # to avoid TLS PartialChain when the public ingress cert is not trusted by the container. EXPOSE 80 ENTRYPOINT ["dotnet", "FrontOffice.Main.dll"]