mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-04 04:31:28 +00:00
run: pull only latest when no tag specified
This makes Docker pull only the image tagged as latest when no tag has been specified. This makes Docker pull only the image it'll run. Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
This commit is contained in:
@@ -1840,6 +1840,10 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||
|
||||
v := url.Values{}
|
||||
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("tag", tag)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user