nuget fight
This commit is contained in:
+12
-2
@@ -12,16 +12,26 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
WORKDIR /src
|
||||
|
||||
# --- NEW: bring in nuget.config first so it gets its own cached layer ---
|
||||
# --- NEW: ensure CA certs + curl are present and up to date in the SDK image ---
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends ca-certificates curl && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# --- NEW: bring in nuget.config FIRST so it's cached as its own layer ---
|
||||
COPY nuget.config ./
|
||||
|
||||
# Copy the project file
|
||||
COPY SystemRevivalServer.csproj ./
|
||||
|
||||
# --- DEBUG STEP: test HTTPS to NuGet from *inside this image* using curl ---
|
||||
# If this fails, you'll see the TLS / network error plainly in the build log.
|
||||
RUN curl -vI https://api.nuget.org/v3/index.json
|
||||
|
||||
# --- UPDATED: more robust restore using our nuget.config ---
|
||||
# Temporarily using 'diagnostic' so we can see the real inner error for NU1301.
|
||||
RUN dotnet restore "SystemRevivalServer.csproj" \
|
||||
--disable-parallel \
|
||||
--verbosity minimal
|
||||
--verbosity diagnostic
|
||||
|
||||
# Copy the rest of the source
|
||||
COPY . .
|
||||
|
||||
Reference in New Issue
Block a user