mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
When no tag is specified in docker pull, skip images that are not tagged
This commit is contained in:
parent
8f9dd86146
commit
7cc294e777
1 changed files with 6 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue