Permalink
Browse files

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)
  • Loading branch information...
unclejack committed May 16, 2014
1 parent c4fc591 commit b8e338144e90a6bb76110ab04cc216966640a3f4
Showing with 4 additions and 0 deletions.
  1. +4 −0 api/client/commands.go
View
@@ -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)

0 comments on commit b8e3381

Please sign in to comment.