Skip to content

Commit

Permalink
build: use legacy builder for wcow if not opt-in with a builder compo…
Browse files Browse the repository at this point in the history
…nent

Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Feb 24, 2022
1 parent e38e6c5 commit e7a8748
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmd/docker/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ func newBuilderError(warn bool, err error) error {
}

func processBuilder(dockerCli command.Cli, cmd *cobra.Command, args, osargs []string) ([]string, []string, error) {
var useLegacy bool
var useBuilder bool
var useLegacy, useBuilder bool

// check DOCKER_BUILDKIT env var is present and
// if not assume we want to use the builder component
Expand Down Expand Up @@ -73,6 +72,12 @@ func processBuilder(dockerCli command.Cli, cmd *cobra.Command, args, osargs []st
return args, osargs, nil
}

// wcow build command must use the legacy builder
// if not opt-in through a builder component
if !useBuilder && dockerCli.ServerInfo().OSType == "windows" {
return args, osargs, nil
}

if useLegacy {
// display warning if not wcow and continue
if dockerCli.ServerInfo().OSType != "windows" {
Expand Down

0 comments on commit e7a8748

Please sign in to comment.