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:
parent
0c11fc384d
commit
275109a6ad
1 changed files with 3 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue