@@ -33,13 +33,13 @@ COPY ["NuGet.Config", "./"]
3333# Attempt package restore with multiple fallback strategies
3434# This addresses the SSL certificate validation issues common in Docker environments
3535RUN echo "=== Attempting NuGet package restore ===" && \
36- echo "Strategy 1: Standard restore" && \
37- (timeout 60 dotnet restore "samples/Demo/NLWebNet.Demo.csproj" --verbosity minimal) || \
36+ echo "Strategy 1: Standard restore with timeout " && \
37+ (timeout 45 dotnet restore "samples/Demo/NLWebNet.Demo.csproj" --verbosity minimal) || \
3838 (echo "Strategy 2: Restore with --disable-parallel" && \
39- timeout 60 dotnet restore "samples/Demo/NLWebNet.Demo.csproj" --verbosity minimal --disable-parallel) || \
40- (echo "Strategy 3: Clear cache and retry" && \
39+ timeout 45 dotnet restore "samples/Demo/NLWebNet.Demo.csproj" --verbosity minimal --disable-parallel) || \
40+ (echo "Strategy 3: Clear cache and retry with ignore-failed-sources " && \
4141 dotnet nuget locals all --clear && \
42- timeout 60 dotnet restore "samples/Demo/NLWebNet.Demo.csproj" --verbosity minimal --ignore-failed-sources) || \
42+ timeout 45 dotnet restore "samples/Demo/NLWebNet.Demo.csproj" --verbosity minimal --ignore-failed-sources) || \
4343 echo "All restore strategies failed due to SSL issues - will attempt build anyway"
4444
4545# Copy all source code
@@ -51,10 +51,10 @@ RUN cd samples/Demo && \
5151 echo "=== Building NLWebNet Demo Application ===" && \
5252 (echo "Attempting build with --no-restore..." && \
5353 dotnet build "NLWebNet.Demo.csproj" -c Release --no-restore --verbosity minimal) || \
54- (echo "Build without restore failed, attempting with restore and shorter timeout..." && \
55- timeout 90 dotnet build "NLWebNet.Demo.csproj" -c Release --verbosity minimal) || \
54+ (echo "Build without restore failed, attempting with restore and short timeout..." && \
55+ timeout 60 dotnet build "NLWebNet.Demo.csproj" -c Release --verbosity minimal) || \
5656 (echo "Standard build failed, trying with ignore-failed-sources..." && \
57- timeout 90 dotnet build "NLWebNet.Demo.csproj" -c Release --verbosity minimal -p:RestoreIgnoreFailedSources=true) && \
57+ timeout 60 dotnet build "NLWebNet.Demo.csproj" -c Release --verbosity minimal -p:RestoreIgnoreFailedSources=true) && \
5858 echo "=== Publishing application ===" && \
5959 dotnet publish "NLWebNet.Demo.csproj" -c Release --no-build -o /app/publish /p:UseAppHost=false
6060
0 commit comments