Quellcode durchsuchen

docker build: pull just latest if tag uspecified

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
unclejack vor 11 Jahren
Ursprung
Commit
6ba5d67a51
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. 3 0
      builder/internals.go

+ 3 - 0
builder/internals.go

@@ -271,6 +271,9 @@ func (b *Builder) runContextCommand(args []string, allowRemote bool, allowDecomp
 
 func (b *Builder) pullImage(name string) (*imagepkg.Image, error) {
 	remote, tag := parsers.ParseRepositoryTag(name)
+	if tag == "" {
+		tag = "latest"
+	}
 	pullRegistryAuth := b.AuthConfig
 	if len(b.AuthConfigFile.Configs) > 0 {
 		// The request came with a full auth config file, we prefer to use that