diff --git a/pkg/util/image_util.go b/pkg/util/image_util.go index 9f1e68e51..f241210f9 100644 --- a/pkg/util/image_util.go +++ b/pkg/util/image_util.go @@ -22,6 +22,7 @@ import ( "net/http" "path/filepath" "strconv" + "strings" "github.com/GoogleContainerTools/kaniko/pkg/timing" @@ -118,6 +119,13 @@ func remoteImage(image string, opts *config.KanikoOptions) (v1.Image, error) { return nil, err } + if !strings.ContainsRune(image, '/') { + ref, err = name.ParseReference("library/"+image, name.WeakValidation) + if err != nil { + return nil, err + } + } + toSet = true }