Merge pull request #16214 from afbjorklund/build-registry
Add docker.io/library to image short namespull/18364/head
commit
375d9c6cbf
|
@ -25,6 +25,8 @@ import (
|
|||
"runtime"
|
||||
"strings"
|
||||
|
||||
dockerref "github.com/docker/distribution/reference"
|
||||
|
||||
"github.com/docker/machine/libmachine/state"
|
||||
"github.com/pkg/errors"
|
||||
"k8s.io/klog/v2"
|
||||
|
@ -59,6 +61,14 @@ func BuildImage(path string, file string, tag string, push bool, env []string, o
|
|||
remote = false
|
||||
}
|
||||
|
||||
if tag != "" {
|
||||
named, err := dockerref.ParseNormalizedNamed(tag)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "couldn't parse image reference %q", tag)
|
||||
}
|
||||
tag = named.String()
|
||||
}
|
||||
|
||||
for _, p := range profiles { // building images to all running profiles
|
||||
pName := p.Name // capture the loop variable
|
||||
|
||||
|
|
Loading…
Reference in New Issue