Browse Source

Restore the stripped registry version number

Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
Richard 10 years ago
parent
commit
f6f7d35248
1 changed files with 2 additions and 0 deletions
  1. 2 0
      graph/pull.go

+ 2 - 0
graph/pull.go

@@ -282,6 +282,8 @@ func (s *TagStore) pullRepository(r *registry.Session, out io.Writer, repoInfo *
 			var lastErr, err error
 			var lastErr, err error
 			var isDownloaded bool
 			var isDownloaded bool
 			for _, ep := range repoInfo.Index.Mirrors {
 			for _, ep := range repoInfo.Index.Mirrors {
+				// Ensure endpoint is v1
+				ep = ep + "v1/"
 				out.Write(sf.FormatProgress(stringid.TruncateID(img.ID), fmt.Sprintf("Pulling image (%s) from %s, mirror: %s", img.Tag, repoInfo.CanonicalName, ep), nil))
 				out.Write(sf.FormatProgress(stringid.TruncateID(img.ID), fmt.Sprintf("Pulling image (%s) from %s, mirror: %s", img.Tag, repoInfo.CanonicalName, ep), nil))
 				if isDownloaded, err = s.pullImage(r, out, img.ID, ep, repoData.Tokens, sf); err != nil {
 				if isDownloaded, err = s.pullImage(r, out, img.ID, ep, repoData.Tokens, sf); err != nil {
 					// Don't report errors when pulling from mirrors.
 					// Don't report errors when pulling from mirrors.