Skip to content

Commit

Permalink
image: prepend library/ when using registry
Browse files Browse the repository at this point in the history
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
  • Loading branch information
greut committed May 12, 2020
1 parent cb11a99 commit fef4bb5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/util/image_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"net/http"
"path/filepath"
"strconv"
"strings"

"github.com/GoogleContainerTools/kaniko/pkg/timing"

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit fef4bb5

Please sign in to comment.