mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #10571 from jfrazelle/8689-remove-all-aliases
Removes the feature to pull all image aliases.
This commit is contained in:
commit
9ea20f260c
2 changed files with 2 additions and 5 deletions
|
@ -1487,8 +1487,7 @@ To download a particular image, or set of images (i.e., a repository),
|
||||||
use `docker pull`:
|
use `docker pull`:
|
||||||
|
|
||||||
$ sudo docker pull debian
|
$ sudo docker pull debian
|
||||||
# will pull the debian:latest image, its intermediate layers
|
# will pull the debian:latest image and its intermediate layers
|
||||||
# and any aliases of the same id
|
|
||||||
$ sudo docker pull debian:testing
|
$ sudo docker pull debian:testing
|
||||||
# will pull the image named debian:testing and any intermediate
|
# will pull the image named debian:testing and any intermediate
|
||||||
# layers it is based on.
|
# layers it is based on.
|
||||||
|
|
|
@ -132,7 +132,6 @@ func (s *TagStore) pullRepository(r *registry.Session, out io.Writer, repoInfo *
|
||||||
|
|
||||||
log.Debugf("Registering tags")
|
log.Debugf("Registering tags")
|
||||||
// If no tag has been specified, pull them all
|
// If no tag has been specified, pull them all
|
||||||
var imageId string
|
|
||||||
if askedTag == "" {
|
if askedTag == "" {
|
||||||
for tag, id := range tagsList {
|
for tag, id := range tagsList {
|
||||||
repoData.ImgList[id].Tag = tag
|
repoData.ImgList[id].Tag = tag
|
||||||
|
@ -143,7 +142,6 @@ func (s *TagStore) pullRepository(r *registry.Session, out io.Writer, repoInfo *
|
||||||
if !exists {
|
if !exists {
|
||||||
return fmt.Errorf("Tag %s not found in repository %s", askedTag, repoInfo.CanonicalName)
|
return fmt.Errorf("Tag %s not found in repository %s", askedTag, repoInfo.CanonicalName)
|
||||||
}
|
}
|
||||||
imageId = id
|
|
||||||
repoData.ImgList[id].Tag = askedTag
|
repoData.ImgList[id].Tag = askedTag
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +245,7 @@ func (s *TagStore) pullRepository(r *registry.Session, out io.Writer, repoInfo *
|
||||||
|
|
||||||
}
|
}
|
||||||
for tag, id := range tagsList {
|
for tag, id := range tagsList {
|
||||||
if askedTag != "" && id != imageId {
|
if askedTag != "" && tag != askedTag {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if err := s.Set(repoInfo.LocalName, tag, id, true); err != nil {
|
if err := s.Set(repoInfo.LocalName, tag, id, true); err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue