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

Upstream-commit: 0a197f9b4fe5f63abf60a17b8d595dd72b7eb471
Component: engine
This commit is contained in:
Joffrey F
2013-05-07 04:54:58 -07:00
parent 71ceced6ad
commit d46e47300a
+5
View File
@@ -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