fix: Add NuGet.config for package source configuration and update restore command in Dockerfile
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 1m5s

This commit is contained in:
masoodafar-web
2026-01-29 02:44:55 +03:30
parent 4743b52cae
commit 77be841221
2 changed files with 20 additions and 2 deletions
+5 -2
View File
@@ -1,11 +1,14 @@
FROM 194.5.195.53:32082/dotnet/sdk:9.0 AS build
WORKDIR /src
# Copy NuGet config first
COPY src/NuGet.config ./
# Copy solution and project files
COPY src/ ./
# Restore and publish
RUN dotnet restore "CMSMicroservice.WebApi/CMSMicroservice.WebApi.csproj"
# Restore with Nexus config and publish
RUN dotnet restore "CMSMicroservice.WebApi/CMSMicroservice.WebApi.csproj" --configfile NuGet.config
RUN dotnet publish "CMSMicroservice.WebApi/CMSMicroservice.WebApi.csproj" -c Release -o /app/publish --no-restore
FROM 194.5.195.53:32082/dotnet/aspnet:9.0 AS runtime