Browse code

docker build: pull just latest if tag uspecified

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)

unclejack authored on 2014/09/04 00:27:25
Showing 1 changed files
... ...
@@ -271,6 +271,9 @@ func (b *Builder) runContextCommand(args []string, allowRemote bool, allowDecomp
271 271
 
272 272
 func (b *Builder) pullImage(name string) (*imagepkg.Image, error) {
273 273
 	remote, tag := parsers.ParseRepositoryTag(name)
274
+	if tag == "" {
275
+		tag = "latest"
276
+	}
274 277
 	pullRegistryAuth := b.AuthConfig
275 278
 	if len(b.AuthConfigFile.Configs) > 0 {
276 279
 		// The request came with a full auth config file, we prefer to use that