mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Cleanup:change latest to graph.DEFAULTTAG
Signed-off-by: Lei Jitang <leijitang@huawei.com>
This commit is contained in:
parent
42861f3b45
commit
3c3968692d
1 changed files with 2 additions and 2 deletions
|
@ -1235,7 +1235,7 @@ func (cli *DockerCli) CmdPull(args ...string) error {
|
|||
)
|
||||
taglessRemote, tag := parsers.ParseRepositoryTag(remote)
|
||||
if tag == "" && !*allTags {
|
||||
newRemote = taglessRemote + ":latest"
|
||||
newRemote = taglessRemote + ":" + graph.DEFAULTTAG
|
||||
}
|
||||
if tag != "" && *allTags {
|
||||
return fmt.Errorf("tag can't be used with --all-tags/-a")
|
||||
|
@ -2034,7 +2034,7 @@ func (cli *DockerCli) pullImageCustomOut(image string, out io.Writer) error {
|
|||
repos, tag := parsers.ParseRepositoryTag(image)
|
||||
// pull only the image tagged 'latest' if no tag was specified
|
||||
if tag == "" {
|
||||
tag = "latest"
|
||||
tag = graph.DEFAULTTAG
|
||||
}
|
||||
v.Set("fromImage", repos)
|
||||
v.Set("tag", tag)
|
||||
|
|
Loading…
Add table
Reference in a new issue