Skip to content

Conversation

@aanand
Copy link
Contributor

@aanand aanand commented Feb 26, 2015

Instead of expanding the registry name we're looking for to a full URL, strip entries in the authconfig down to just the hostname.

This mirrors how the Docker client does it - see ResolveAuthConfig in auth.go - and should fix docker/compose#75.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use https://docs.python.org/2/library/urlparse.html#urlparse.urlparse instead ? It should be more robust to unexpected parts of the url.

It's available as six.moves.urllib.parse.urlparse

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arguably better, yes, but I wanted to stick close to the Docker client's behaviour. Not sure what's the stronger principle here!

@aanand aanand force-pushed the fix-resolve-authconfig branch 2 times, most recently from fe213cb to b1a858a Compare February 27, 2015 13:10
Instead of expanding the registry name we're looking for to a full URL,
strip entries in the authconfig down to just the hostname.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
@aanand
Copy link
Contributor Author

aanand commented Feb 27, 2015

Fixed the tests.

@shin- shin- merged commit b1a858a into docker:master Feb 27, 2015
@shin-
Copy link
Contributor

shin- commented Feb 27, 2015

Thanks Aanand! Merged :)

@aanand aanand deleted the fix-resolve-authconfig branch February 27, 2015 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for registry authentication

3 participants