-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Accept --arch based on uname -m names (ie x86_64/aarch64) in addition to GOARCH like arch (ie amd64/arm64) #12680
Comments
I am fine with this, interested in opening a PR for this? The only issue, I see is that when inspecting the image, users would see a different value. I ask for x86_64 but when I inspect image I get amd64. I have had the same problem confusing the two names. |
Please note that the accepted values are clearly restricted in the OCI specifications. We should be very careful to add "custom" architectures. |
I just checked the latest upstream version. It seems that buildah already accepts --arch aarch64:
but podman doesn't (for now):
I will try to find by myself how this is achieved in buildah and see if I can shamelessly copy/paste this in podman as well ;) |
Note that the fedora manifest list (see below) has no matching entry for
|
Buildah is using containerd's platform normalization (e.g., containers/buildah@9f9f32ceddf4) so it seems that containerd is supporting it as well. So it seems Podman should as well. I think that we could handle that down in libimage. |
Yes I think this is a good idea. |
Buildah, containers and probably other container engines are normalizing the platform parameters to support common values. For instance, "x86_64" is normalized to the OCI conformant "amd64". Use the same normalization when copying images and looking up local images. Also add some debug logs to facilitate future debugging. Fixes: containers/podman/issues/12680 Signed-off-by: Valentin Rothberg <[email protected]>
PR over in c/common: containers/common#867 |
Ah thanks for looking at it. I had found the platform.Normalize call, but I really understand nothing to Go, this thing is much more complicated than C++ that I use everyday ! ;) |
Buildah, containers and probably other container engines are normalizing the platform parameters to support common values. For instance, "x86_64" is normalized to the OCI conformant "amd64". Use the same normalization when copying images and looking up local images. Also add some debug logs to facilitate future debugging. Fixes: containers/podman/issues/12680 Signed-off-by: Valentin Rothberg <[email protected]>
Buildah, containers and probably other container engines are normalizing the platform parameters to support common values. For instance, "x86_64" is normalized to the OCI conformant "amd64". Use the same normalization when copying images and looking up local images. Also add some debug logs to facilitate future debugging. Fixes: containers/podman/issues/12680 Signed-off-by: Valentin Rothberg <[email protected]>
/kind feature
Description
I personally think it would be a nice to have if podman build/run would accept a flag "--arch=aarch64". Right now it doesn't. Example trying podman in podman with upstream podman:
normally it's been several months that for example "docker buildx build" accepts using aarch64 rather than arm64.
Why would this help ? In case of multiarch builds which we are right now trying to use in Amadeus, I wish I could easily do some podman in docker/podman or podman side by side podman scenarios where the top level container is itself an emulated container running qemu and that the emulated arch would "propagate" in the child container too. Eg, in other words, if this could work (run from an x86_64 machine), this would be cool:
(by the way, it seems it doesn't work because of another error "ERRO[0000] failure getting variant error="getCPUInfo for pattern: Cpu architecture: not found", which I don't know if you want to fix as well).
And final point, but here if you want we can keep it private between Amadeus and Red Hat since it's more RHEL related than podman related (you have my mail adress already ;) ): right now Red Hat doesn't provide the package qemu-user-static for RHEL, at least on RHEL 8, and it was refused in the past when I opened an internal Red Hat ticket to have it. Since I have the feeling multi-arch builds using qemu will come more and more, does Red Hat has now plans (maybe for RHEL 9) to provide an official RHEL qemu-user-static packages (based on the fedora one, of course) ?
Cheers,
Romain
The text was updated successfully, but these errors were encountered: