mirror of https://github.com/docker/docs.git
Merge pull request #5841 from unclejack/run_pull_latest
run: pull only latest when no tag specified
This commit is contained in:
commit
808d28033b
|
|
@ -1840,6 +1840,10 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||||
|
|
||||||
v := url.Values{}
|
v := url.Values{}
|
||||||
repos, tag := utils.ParseRepositoryTag(config.Image)
|
repos, tag := utils.ParseRepositoryTag(config.Image)
|
||||||
|
// pull only the image tagged 'latest' if no tag was specified
|
||||||
|
if tag == "" {
|
||||||
|
tag = "latest"
|
||||||
|
}
|
||||||
v.Set("fromImage", repos)
|
v.Set("fromImage", repos)
|
||||||
v.Set("tag", tag)
|
v.Set("tag", tag)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue