From d46e47300a2716e721c7cc0fbebb32a7c89f2db0 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Tue, 7 May 2013 04:54:58 -0700 Subject: [PATCH] Fixes bug when pulling an official image (no user namespace) with a specified tag Upstream-commit: 0a197f9b4fe5f63abf60a17b8d595dd72b7eb471 Component: engine --- components/engine/registry.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/engine/registry.go b/components/engine/registry.go index f9bc756643..9920cf0389 100644 --- a/components/engine/registry.go +++ b/components/engine/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