Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

support pulling private images from docker pull #684

Merged
merged 1 commit into from
Apr 28, 2015
Merged

support pulling private images from docker pull #684

merged 1 commit into from
Apr 28, 2015

Conversation

vieux
Copy link
Contributor

@vieux vieux commented Apr 28, 2015

Signed-off-by: Victor Vieux victorvieux@gmail.com

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
@vieux
Copy link
Contributor Author

vieux commented Apr 28, 2015

ping @aluzzardi

@vieux vieux mentioned this pull request Apr 28, 2015
@@ -251,6 +252,11 @@ func postImagesCreate(c *context, w http.ResponseWriter, r *http.Request) {
wf := NewWriteFlusher(w)

if image := r.Form.Get("fromImage"); image != "" { //pull
authConfig := dockerclient.AuthConfig{}
buf, err := base64.URLEncoding.DecodeString(r.Header.Get("X-Registry-Auth"))
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks good, however I was wondering why passing the auth only when using fromImage?

If we receive a X-Registry-Auth from the client, shouldn't we always pass it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when fromImage is not provided it means import, and we don't need authConfig for import

@vieux vieux added the area/API label Apr 28, 2015
@vieux vieux added this to the 0.3.0 milestone Apr 28, 2015
@vieux vieux self-assigned this Apr 28, 2015
@aluzzardi
Copy link
Contributor

LGTM

aluzzardi added a commit that referenced this pull request Apr 28, 2015
support pulling private images from docker pull
@aluzzardi aluzzardi merged commit 246bee3 into docker-archive:master Apr 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants