瀏覽代碼

Fixes bug when pulling an official image (no user namespace) with a specified tag

Joffrey F 12 年之前
父節點
當前提交
0a197f9b4f
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      registry.go

+ 5 - 0
registry.go

@@ -211,6 +211,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