Make sure new repositories can be pushed with multiple tags

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-01-20 13:39:35 -08:00
parent 0c11fc384d
commit 275109a6ad

View file

@ -205,15 +205,18 @@ func (r *Registry) GetRemoteHistory(imgID, registry string, token []string) ([]s
}
// Check if an image exists in the Registry
// TODO: This method should return the errors instead of masking them and returning false
func (r *Registry) LookupRemoteImage(imgID, registry string, token []string) bool {
req, err := r.reqFactory.NewRequest("GET", registry+"images/"+imgID+"/json", nil)
if err != nil {
utils.Errorf("Error in LookupRemoteImage %s", err)
return false
}
setTokenAuth(req, token)
res, err := doWithCookies(r.client, req)
if err != nil {
utils.Errorf("Error in LookupRemoteImage %s", err)
return false
}
res.Body.Close()