зеркало из https://github.com/microsoft/docker.git
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:
Коммит
1c5083315d
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче