Skip to content

Accept --arch based on uname -m names (ie x86_64/aarch64) in addition to GOARCH like arch (ie amd64/arm64) #12680

@Romain-Geissler-1A

Description

@Romain-Geissler-1A

/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:

> podman run --privileged -t -i --rm quay.io/podman/upstream podman run -t -i --rm --arch=aarch64 fedora uname -a
Resolved "fedora" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull registry.fedoraproject.org/fedora:latest...
Error: choosing an image from manifest list docker://registry.fedoraproject.org/fedora:latest: no image found in manifest list for architecture aarch64, variant "", OS linux

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:

> podman run --arch=arm64 --privileged -t -i --rm quay.io/podman/upstream sh -c 'podman run -t -i --rm --arch=$(uname -m) fedora uname -a'                                                                                                                       
Trying to pull quay.io/podman/upstream:latest...
Getting image source signatures
Copying blob sha256:9cf36a3ba6d8ca7d2f69c34d3b5a25e0a5cbc91c4acbab0877fdd676dadebbb7
Copying blob sha256:73333db80aa9f76e1ed26dcdf52e4d3ab82f90e926417e0f2ad6c4ba843a3030
Copying blob sha256:37f8fd3d39b73a8a6155ddf09aa1ecc7f71e8d89e5e129a0607b2a9534e11c4f
Copying blob sha256:6f738690ee1a0c7a9cdbf7cba15c9c819b5930bb69f91530d7210c403da94e65
Copying blob sha256:0502db657bc4fdee90878f5c45f94c853c3bb5b9bf38e0c17daf1234a8f6a80f
Copying blob sha256:5c3bf42ff74e848b614d64d2ba88ca422e52a41af585d592522b7928b26959ce
Copying blob sha256:3151ed8e5ab4415cfc88a864fc5fe641666ec1973ceaa375d5de7c7d808dc737
Copying blob sha256:64bc8d331a3817298597d901b025292791739e6ac167dc60b65e009a3b03a23b
Copying config sha256:13d6fc982c6c3cc9b6a7936c68304ca1c98f58d27e1b385073c1343d11b0fc80
Writing manifest to image destination
Storing signatures
ERRO[0000] failure getting variant                       error="getCPUInfo for pattern: Cpu architecture: not found"
Resolved "fedora" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull registry.fedoraproject.org/fedora:latest...
Error: choosing an image from manifest list docker://registry.fedoraproject.org/fedora:latest: no image found in manifest list for architecture aarch64, variant "", OS linux

(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

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions