dotnet / sdk-container-builds

Libraries and build tooling to create container images from .NET projects using MSBuild

Home Page:https://learn.microsoft.com/en-us/dotnet/core/docker/publish-as-container

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatically attempt to authenticate with docker hub if no local credentials are stored

baronfel opened this issue · comments

When pulling Docker Hub, we should attempt a credential-less authentication to the Docker Hub authentication server auth.docker.io with the service registry-1.docker.io and the scope repository:{repository name}:pull. This will issue us a token that we can store in our cache for pulls. This should only be done as a fallback, if there are no other docker.io/registry-1.docker.io credentials in the credentials store.

Doing this makes the onboarding path very smooth, as users no longer have to perform an explicit docker login registry-1.docker.io call before using our tooling.