Skip to content

Commit

Permalink
Merge pull request #16214 from afbjorklund/build-registry
Browse files Browse the repository at this point in the history
Add docker.io/library to image short names
  • Loading branch information
medyagh authored Mar 11, 2024
2 parents e658ce6 + 32a2e10 commit 375d9c6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/minikube/machine/build_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 375d9c6

Please sign in to comment.