Merge pull request #1103 from shin-/1060-pull-only-tagged-images

*Registry: When no tag is specified in docker pull, skip images that are not tagged
This commit is contained in:
Victor Vieux 2013-07-02 10:08:21 -07:00
Родитель a20dcfb049 7cc294e777
Коммит 1c5083315d
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -402,7 +402,7 @@ func (srv *Server) pullRepository(r *registry.Registry, out io.Writer, local, re
// Otherwise, check that the tag exists and use only that one
id, exists := tagsList[askedTag]
if !exists {
return fmt.Errorf("Tag %s not found in repositoy %s", askedTag, local)
return fmt.Errorf("Tag %s not found in repository %s", askedTag, local)
}
repoData.ImgList[id].Tag = askedTag
}
@ -412,6 +412,11 @@ func (srv *Server) pullRepository(r *registry.Registry, out io.Writer, local, re
utils.Debugf("(%s) does not match %s (id: %s), skipping", img.Tag, askedTag, img.ID)
continue
}
if img.Tag == "" {
utils.Debugf("Image (id: %s) present in this repository but untagged, skipping", img.ID)
continue
}
out.Write(sf.FormatStatus("Pulling image %s (%s) from %s", img.ID, img.Tag, remote))
success := false
for _, ep := range repoData.Endpoints {