Open matthewhembree opened 3 years ago
Are these arm builds running through qemu. Do you have binfmt setup properly on these k8s nodes? Eg. https://github.com/tonistiigi/binfmt#installing-emulators
https://github.com/docker/buildx/issues/495 looks related
Are these arm builds running through qemu. Do you have binfmt setup properly on these k8s nodes? Eg. tonistiigi/binfmt#installing-emulators Yes, they should be. They're (arm64 builds) not native.
I'm just wondering what needs to be done for multiarch qemu builds with the k8s driver. Maybe it's something that needs to be done in the kubernetes driver setup https://github.com/docker/buildx/tree/master/driver/kubernetes. Or does something need to be integrated into https://github.com/moby/buildkit.
Or could it be something as simple as updating the buildx README.
You need to install qemu on the nodes. Eg. with image from https://github.com/tonistiigi/binfmt#installing-emulators (distro packages usually do not work properly) . In buildx ls
you should see all emulated platforms as you do for the default instance. *
means you just set the platform manually on buildx create
and will not work unless node is not properly setup.
@AkihiroSuda Maybe you could provide example k8s yaml for https://github.com/tonistiigi/binfmt that we could link to.
It seems like this would best be done as a privileged init container in https://github.com/docker/buildx/tree/master/driver/kubernetes, since you would want this applied to /proc/sys/fs/binfmt_misc
on whichever node the buildx worker pod exists on. That should work with rootless buildx pods. And would also require good documentation in the readme, so that people understand the requirements needed to accomplish this. I believe it would be safe to set binfmt for all architectures, but it could take platform parameters from buildx create
.
I am having an issue installing Debian packages in the build context.
This happens when targeting an linux/arm64 or linux/arm/v7 platform. I do not have the same issue targeting linux/amd64 platforms.
Some more background:
This only happens in a Docker buildx kubernetes driver environment.
When in a Docker buildx docker driver environment, builds work fine.
When run in a Docker run environment, everything runs fine. Both linux/arm64 and linux/amd64 platforms.
The behavior similarly fails between Debian Buster and Stretch in my tests.
Scenarios:
Dockerfile:
Reproduction:
Build commands:
Run commands:
Logs:
kubernetes driver:
The following lines are interesting:
They vary when running
FROM debian:stretch-slim
:I don't understand why this fails with the kubernetes driver (on linux/arm*). And why there's a variance with buster versus stretch. š¤·
Environment:
Local environment:
I am using the latest buildx plugin.
Buildx environment:
Thanks!