diff --git a/Dockerfile b/Dockerfile index a62d6b2..68dcb91 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/src/NuGet.config b/src/NuGet.config new file mode 100644 index 0000000..a5af54d --- /dev/null +++ b/src/NuGet.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file