Selaa lähdekoodia

Merge pull request #543 from dotcloud/pull-official-tag-fix

- Registry: Fix pull for official images with specific tag
Guillaume J. Charmes 12 vuotta sitten
vanhempi
commit
a2b5196061
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      registry.go

+ 5 - 0
registry.go

@@ -212,6 +212,11 @@ func (graph *Graph) getRemoteTags(stdout io.Writer, registries []string, reposit
 
 func (graph *Graph) getImageForTag(stdout io.Writer, tag, remote, registry string, token []string) (string, error) {
 	client := graph.getHttpClient()
+
+	if !strings.Contains(remote, "/") {
+		remote = "library/" + remote
+	}
+
 	registryEndpoint := "https://" + registry + "/v1"
 	repositoryTarget := registryEndpoint + "/repositories/" + remote + "/tags/" + tag