Skip to content
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

buildkit build arm image faild when on k8s pods #2329

Closed
gitfxx opened this issue Aug 24, 2021 · 9 comments
Closed

buildkit build arm image faild when on k8s pods #2329

gitfxx opened this issue Aug 24, 2021 · 9 comments

Comments

@gitfxx
Copy link

gitfxx commented Aug 24, 2021

No description provided.

@gitfxx
Copy link
Author

gitfxx commented Aug 24, 2021

os:centos8 x86

@tonistiigi
Copy link
Member

Looks like you have not posted the logs for failing command (should be reprinted on latest version). Also, if this comes from emulation you might have better luck with installing emulator image from https://github.com/tonistiigi/binfmt

@gitfxx
Copy link
Author

gitfxx commented Aug 25, 2021

I run this command and it sloved.
image
but i can't understand.
The buildkit already has these QEMU files in its container,Why do you need to execute additional commands to install binfmt on the node?
image

@tonistiigi
Copy link
Member

The fallback in container is not quite the same. It should work in most cases but in-kernel support is still preferred. Would need to see the actual error logs to maybe understand better what caused this.

@gitfxx
Copy link
Author

gitfxx commented Aug 25, 2021

11

@tonistiigi
Copy link
Member

The log that was missing was from your build you only clipped the lines that didn't have the output for the failed command.

@gitfxx
Copy link
Author

gitfxx commented Aug 25, 2021

@tonistiigi how do i get the logs for failing command?

@tonistiigi
Copy link
Member

The ones you posted on the first comment. You just didn't post all of them.

@tonistiigi
Copy link
Member

[2021-08-24 10:05:42.626] #28 0.517 go fmt ./...
[2021-08-24 10:05:42.626] #28 0.522 make: *** [Makefile:38: fmt] Error 1
[2021-08-24 10:05:42.889] #28 ERROR: executor failed running [/dev/.buildkit_qemu_emulator /bin/sh -c cd ecs-server/ && make]: exit code: 2

ok, that's not very helpful.

Usually the embedded qemu fallback fails when you have a mix of binaries with different architectures in your container. Embedded fallback requires all binaries to be for the target architecture. Binfmt in kernel allows mixing as well. If this doesn't sound likely you can try to modify your make/go fmt command to print more logs about where it is failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants