image: prepend library/ when using registry
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
This commit is contained in:
parent
cb11a9982c
commit
fef4bb55b7
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue