Closed mthalman closed 4 months ago
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.
I was able to revert all the changes which flowed RegistryAuthContext
all over the place and replaced it with a DI solution: https://github.com/dotnet/docker-tools/pull/1262/commits/02e1e8c3ed34f200488474dade29bc90491862ad.
I'm going to hold off on merging this until https://github.com/dotnet/docker-tools/pull/1260 is merged and rolled out.
This provides a common API,
IRegistryContentClient
, that provides an interface for querying container registries. This provides a common interface for both the ACR that we own as well as 3rd party registries. For our ACR, it uses the Azure library which provides the Azure auth implementation we require. The logic for determining which implementation to use is inRegistryClientFactory
. For now, this uses a hardcoded registry name to determine which implementation it should use. This is temporary. Once I get signoff on these changes, I'll replace that so that the value can be passed in via the command call. That will modify a whole bunch of files so I want to wait until the end to make that change.