Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2.2k
bring back and expose BuildKitEnabled func#3435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
| @@ -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" { | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm slightly concerned that there's now 2 implementations to do the BuildKit check (one in MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I was thinking of moving some logic to Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could we extract the common bits to a non-exported function perhaps? (haven't checked), so something like; func (cli*DockerCli) BuildKitEnabled() (bool, error) {
foo, _, err:=doTheBuildKitCheck(cli)
returnfoo, err
}
| ||
| return args, osargs, nil | ||
| } | ||
crazy-max marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| if useLegacy { | ||
| // display warning if not wcow and continue | ||
| if dockerCli.ServerInfo().OSType != "windows" { | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably for a follow-up, but I just realise we don't take older daemons into account. (Should we default to "false" on, daemons that do not yet have BuildKit, or before BuildKit left experimental (BuildKit no longer required
experimentalsince 18.09.0; https://docs.docker.com/engine/release-notes/18.09/#new-features)