Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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