Change:
# $3 is the value to set the --pull flag for docker build; true by default # $4 is the set of --build-args for docker. function kube::build::docker_build() { <ins> kube::util::ensure-docker-buildx </ins> local -r image=$1 local -r context_dir=$2 local -r pull="${3:-true}"

Discussion:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! If the matter is security related, please disclose it privately via --When I ran , it failed with the following error: I expected the build to successfully complete, or to be warned that I am missing a required build dependency. If you don't have docker buildx installed, you will hit this error. However, that error is masked when you pass the full command line: Appears to have been introduced in Kubernetes version (use ): HEAD (1.22.x) Cloud provider or hardware configuration: N/A, local build OS (e.g: ): Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others:
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig release
That's not the same as in the script, which should be setting which ungates this command. (we depended on this env for much longer in the project to use ) Stable docker versions should have buildx, at least behind this env. unfortunately the project has never validated a minimum docker version for building.
buildx as a build requirement was actually introduced at least as back as 1.21 as well, for some of the core images. we've just standardized on it more since then (including the linked commit), so if we do add some validation we should probably backport it. I think docker buildx has been available since 19.03?, but it appears your install is too old to have the flag in buildx. we could also try switching to , I'm not sure which version introduced .
No difference with the flag. But I am not running upstream Docker, I'm running Docker out of the Debian repos.
discussed on slack: seems debian packages don't have the buildx plugin , while docker-ce / docker desktop do.

we should at least be checking for the command and throwing a clear error like we do with e.g. tar.
Filed to discuss the expectation users might have re: the docker PPAs vs the Debian repos and buildx availability.
/
also
Note: reverting fixes the issue, so I have been building locally with that as a carry patch as a workaround.
cc apparently there are docker packages that don't ship this, which maybe changes the equations a bit, see above.
/assign
tl;dr from isn't actually part of moby, but Docker Inc. ships it as part of their Docker packages in their PPA. It's a separate tool with a separate code repo.
would it be eligible for another package? otherwise we probably need to provide support for installing it at least to some extent, e.g. if you are on mac with ancient bash we point to installing with homebrew in the failure message that detects this (and we should also be detecting that the command is missing).
You can build it from source and install it as a docker plugin by following the instructions at I doubt it'll be part of any of the FOSS distro repos soon (although I'm happy to be proven wrong on that).
we don't have the yard stick that something we use should be part of FOSS distro repos. Just that it needs to be easily installable.
Seems like you can also use the release artifacts from github as well, you don't need their ppa and you won't need to build it either.
Here is an image I created to solve not having buildx in the official image
/assign
has been updated to use the official binary buildx image
AL2 also does not come with buildx built in and I landed in with the same issue.