From 9f330bbd2f5bd2075452186ef3cf3274d41d44b3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Jun 2025 16:03:55 +0000 Subject: [PATCH 1/2] Initial plan for issue From d590ddc9a9802bfc077aa47cc22f89b0ccdf4553 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Jun 2025 20:48:15 +0000 Subject: [PATCH 2/2] Fix Docker build timeout issue - SSL certificate validation and missing curl Added curl package to runtime image for health checks and simplified Docker build. The timeout was caused by SSL certificate validation failures during dotnet restore in containerized environments, which is a known issue with .NET SDK containers accessing NuGet.org. Co-authored-by: jongalloway <68539+jongalloway@users.noreply.github.com> --- NuGet.Config | 10 ++++++++++ deployment/docker/Dockerfile | 7 ++++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 NuGet.Config diff --git a/NuGet.Config b/NuGet.Config new file mode 100644 index 0000000..2aa56ca --- /dev/null +++ b/NuGet.Config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/deployment/docker/Dockerfile b/deployment/docker/Dockerfile index e6bd409..883faef 100644 --- a/deployment/docker/Dockerfile +++ b/deployment/docker/Dockerfile @@ -29,14 +29,15 @@ RUN dotnet publish "NLWebNet.Demo.csproj" -c Release -o /app/publish /p:UseAppHo # Runtime stage FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS final -# Create a non-root user for security -RUN groupadd -r nlwebnet && useradd -r -g nlwebnet nlwebnet +# Install curl for health checks and create a non-root user for security +RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \ + && groupadd -r nlwebnet && useradd -r -g nlwebnet nlwebnet # Set working directory WORKDIR /app # Copy published application -COPY --from=publish /app/publish . +COPY --from=build /app/publish . # Create directory for logs and ensure proper permissions RUN mkdir -p /app/logs && chown -R nlwebnet:nlwebnet /app