Skip to content

Consider using a simpler pattern to initialize the NuGet package cache #381

@MichaelSimons

Description

@MichaelSimons

Currently the SDK Dockerfiles use the following pattern to initialize the package cache.

# Trigger the population of the local package cache
RUN mkdir warmup \
    && cd warmup \
    && dotnet new \
    && cd .. \
    && rm -rf warmup \
    && rm -rf /tmp/NuGetScratch

This pattern was necessary at the time it was written and can now be simplified. Invoking any dotnet cmd will trigger the first run experience. Additionally with the NuGetFallback folder, CLI no longer utilizes NuGet to initialize the package cache therefore the NuGetScratch directory is no longer created.

RUN dotnet help

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions