-
Notifications
You must be signed in to change notification settings - Fork 156
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
getting wrong architecture during build #21
Comments
Hi, can you post your workflow file? |
The problem seems to be around here, inside that Makefile you build with "make all". It's creating another x86_64 alpine container inside the emulated armv7 one.
|
I'd recommend to add a new target in the makefile that just builds without imposing the creation of an x86 container on the caller, that way you'll be able to build it anywhere you want. As it is, it's impossible to build it anywhere else. |
yep that's true. But that shouldn't be a problem cause since I'm using Docker in Docker, your CI container becomes the host for this build, and its architecture is in fact The problem here (I believe) is that containerd doesn't seem to play well with |
hum not really no. The current Makefile uses Docker for most stages, and Docker infers the underlying arch by itself, thus this Makefile is in fact working for both amd64 and aarch64 on travis -> https://github.com/SixSq/img-authz-plugin/blob/master/.travis.yml#L19 |
Might depend on how the host CPU is determined within the Makefile. Within docker containers the See https://stackoverflow.com/questions/31012297/uname-a-returning-the-same-in-docker-host-or-any-docker-container for info about this. I don't have a solution handy, but I'm sure there's a way to determine the emulated CPU from within the container. Might require some adjustments to the Makefile. The reason it probably works on Travis, is I believe that Travis runs aarch64 natively. |
I'm running Docker in docker to build for armv7l, but I keep getting:
ERRO[0000] failure getting variant error="getCPUInfo for pattern: Cpu architecture: not found"
and the end result is an amd64 Docker image, built from within the armv7l/debian:buster setup in my workflow...how can this be?
The text was updated successfully, but these errors were encountered: