Closed lexfrei closed 3 years ago
@lexfrei 👋🏻 I think support to build mult-arch images will be a good addition. We will update you once we start working on this feature :)
is this just the -arch
argument?
this user also points out you need to have qemu-user-static
installed
https://github.com/containers/buildah/issues/1590#issuecomment-771924743
Hi @lexfrei this feature is now added in v2
version of the action.
Hi!
I'm trying to initiate a multi-arch build though it's failing.
My failed workflow can be found here
I have set.
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2.2.1
with:
image: tumbleweed-dnf-toolbox
tags: ${{ env.SHORT_SHA }} ${{ env.SNAPSHOT }} latest
archs: amd64,ARM64
oci: true
context: images/opensuse/tw/dnf
dockerfiles:
./images/opensuse/tw/dnf/Dockerfile
I can build just fine on the CLI like buildah bud --arch amd64,ARM64 -t anthr76-devops-toolbox:20210305 .
Hey there @tetchel !
Thanks for taking a look! This is interesting as I originally had that.
I now receive the error on the image from OpenSUSE's registry (registry.opensuse.org/opensuse/tumbleweed-dnf), but not on the image I layered!
Which an interesting pattern, of which I'm assuming is a Buildah bug or an issue with the SUSE image. Though the SUSE image is indeed multi-arch. This can actually be re-produced on the CLI with both casings of arm.
buildah bud --arch amd64,ARM64 -t tumbweed-toolbox-dnf:20210306 .
STEP 1: FROM registry.opensuse.org/opensuse/tumbleweed-dnf
error creating build container: Error choosing an image from manifest list docker://registry.opensuse.org/opensuse/tumbleweed-dnf:latest: no image found in manifest list for architecture amd64,ARM64, variant "", OS linux
ERRO exit status 12
Sorry, I deleted my comment because I wanted to investigate further.
I wonder if the problem could be worked around by doing a buildah pull --arch
with each arch you want, before doing the bud
.
Another workaround worth trying is building the architectures separately (using a matrix strategy), ie one with --arch arm64
and another with --arch amd64
.
I wonder if the problem could be worked around by doing a buildah pull --arch with each arch you want, before doing the bud
This worked (at least on the CLI)! Neat workaround. Wonder what exactly is causing this..
Hey folks :wave: Is there any chance that the buildah-build
action might support the --platform
multi-arch buildah
option in future? (I can open a feature request if that's better than asking in here)
(as I understand it / for context: --platform
is a way to provide --os
, --arch
and --variant
within a single parameter, so it conflicts with those if they are set)
Thanks, @tetchel!
Looks like the buildah can build multi-arch images: https://github.com/containers/buildah/issues/1590 Can we use it in this action?