kubernetes: Builds fail without `docker buildx`, but dependency isn't validated
What happened:
When I ran make update, it failed with the following error:
ehashman@fedora:~/src/k8s$ make update
Running in silent mode, run with SILENT=false if you want to see script logs.
Running in short-circuit mode; run with FORCE_ALL=true to force all scripts to run.
Running update-generated-protobuf
+++ Docker build command failed for kube-build:build-09f02a7f40-5-v1.16.5-1
unknown flag: --load
See 'docker --help'.
...
What you expected to happen:
I expected the build to successfully complete, or to be warned that I am missing a required build dependency.
How to reproduce it (as minimally and precisely as possible):
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:
ehashman@fedora:~/src/k8s$ docker buildx build
docker: 'buildx' is not a docker command.
See 'docker --help'
ehashman@fedora:~/src/k8s$ docker buildx build --load
unknown flag: --load
See 'docker --help'.
Anything else we need to know?:
Appears to have been introduced in https://github.com/kubernetes/kubernetes/commit/086cdfb3601536f24b127d6e1a16fdd96f468126
Environment:
- Kubernetes version (use
kubectl version): HEAD (1.22.x) - Cloud provider or hardware configuration: N/A, local build
- OS (e.g:
cat /etc/os-release): - Kernel (e.g.
uname -a): - Install tools:
- Network plugin and version (if this is a network-related bug):
- Others:
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 21 (19 by maintainers)
Commits related to this issue
- Merge pull request #104749 from cpanato/GH-102822 build/common: check if docker buildx is available — committed to kubernetes/kubernetes by k8s-ci-robot 3 years ago
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 https://hub.docker.com/r/maniator/dind-buildx
cc @vinayakankugoyal 🙈 apparently there are docker packages that don’t ship this, which maybe changes the equations a bit, see above.
Filed https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=989917 to discuss the expectation users might have re: the docker PPAs vs the Debian repos and buildx availability.