Nuget restore from Docker - 429 response

We are trying to build our application in Docker, and after two or three test builds close together, we started getting 429 responses from the FR nuget server, and builds would no longer complete. Is the rate limit set extremely low? We just want to make sure that we don't request packages too often.

Comments

  • Hello!

    Use caching for the COPY *.csproj layer before running `dotnet restore`, or the Docker BuildKit cache mount (`--mount=type=cache,target=/root/.nuget/packages`), or a local NuGet proxy (Azure Artifacts, Nexus, GitLab/GitHub Package Registry, BaGet).

    You can also extract the required .nupkg packages into the project folder and reference them via a local <add key="local" value="./nupkgs" /> in NuGet.config — this way, the Docker build will not access the external NuGet at all.

This discussion has been closed.