Skip to content

Conversation

aanand
Copy link
Contributor

@aanand aanand commented Dec 10, 2015

Fixes the problem described in docker/compose#1622 (comment). Auth lookups were failing for private images specified as docker.io/username/image.

I'm still a bit unsure as to exactly how we're supposed to treat each type of key we encounter in an auth file (e.g. whether we're supposed to strip all URLs of scheme and path, or just special-case the Docker index). I had a go at reading the Docker client code but it's hard to follow. So I'm not 100% sure we're doing the right thing here.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
The structure of the fake config dictionary was not reflective of what
actual parsed config looks like.

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

dnephin commented Dec 14, 2015

Seems reasonable to me.

Previously we weren't converting index.docker.io to docker.io which caused the "find auth config for hostname" to fail for a private repo on the hub. After this change we normalize to docker.io. Is that right?

@shin-
Copy link
Contributor

shin- commented Dec 14, 2015

I'll try to check against the engine code base, I was in that part not too long ago for #861

@aanand
Copy link
Contributor Author

aanand commented Dec 15, 2015

@dnephin correct.

@shin-
Copy link
Contributor

shin- commented Dec 16, 2015

Ok, I checked against the engine code (which I agree is a mess) and this looks to imitate the behavior properly.

LGTM.

aanand added a commit that referenced this pull request Dec 16, 2015
Treat 'index.docker.io' repo names as 'docker.io'
@aanand aanand merged commit 1dae8ef into docker:master Dec 16, 2015
@aanand aanand deleted the fix-index.docker.io branch December 16, 2015 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants