Reorder priority for retrieving auth from Docker config (~/.docker/config.json) #1958
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1819.
This is actually more than that. The priority is now
credHelpers
-->credsStore
-->auths
. According to moby/moby#25851 (and assuming it wasn't reverted), looks like at leastcredHelpers
should take precedence overcredsStore
:Also, I've lifted the restriction that there should be a matching
auths
registry entry forcredsStore
to be returned. The practice to define an emptyauths
entry is documented in here (but it dropped thecredsStore
support in 2.0 anyways.) My guess is that the previous practice is attributed to a quick workaround to prevent a failure in certain circumstances: awslabs/amazon-ecr-credential-helper#9 (comment) Nonetheless, it seems to me the workaround is no longer relevant anymore with this change in recent Docker versions where Docker queries the credential helper to populate a list of supported registries instead of using the registries in theauths
section. This is also explained in awslabs/amazon-ecr-credential-helper#9 (comment)Will update CHANGELOG soon.