image: prepend library/ when using registry
@@ -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
}
