Hi Chris,

Thanks for the explanations.

Downloading the image from docker hub seems to solve the problem. None of those warnings popped up. I think that the mentioned github repo didn't have the complete set of architectures included. But Docker hub has a mechanism that includes all the architectures in its repo. 


On Wed, Jun 12, 2024 at 19:18, Chris Evich
<cevich@redhat.com> wrote:
> I assume it might not have the complete set of architectures.

So just as an FYI, there are two primary ways multiple architectures are
handled with images:

1. Separate arch-specific tags, i.e. repo/name:v1.0-amd64
2. Manifest lists (single name containing multiple "image" components)

The skopeo command I gave you works with the second method, it will fail
with the first.  i.e. the --raw argument makes it show the manifest list
instead of the local arch image flavor.

If needed, it's possible to build/push/copy/assemble manifest lists
using podman/buildah/skopeo but it can be slightly non-intuitive.  Both
podman and buildah have a 'manifest' sub-command to manipulate the
bundle of images.  However there's no "podman manifest list", you have
to use `podman images --filter=manifest=true` to see them.  The "podman
images" command only ever shows a single platform and/or arch image.

To see the manifest-list structure with skopeo, reference the local
storage like:

skopeo inspect --raw \
  containers-storage:example.com/imange/name:tag \
  | jq .

Hope that helps.

---
Chris Evich (he/him)
Senior Quality Assurance Engineer
If there's a "hard-way", I'm the first one to implement it.

On 6/12/24 10:08, Mehdi Haghgoo wrote:
> You are right Chris. Even without the --arch flag, the command automatically pulls the image and it issues the same warning. Since this repo is a mirror from a selected set of Docker Hub tags, I assume it might not have the complete set of architectures. I have simply pulled some tags and pushed them to ghcr.io.
>
> So, I'll try pulling from docker.io and see if it makes a difference.
>
>
>
>
>
>
>
>
> On Wednesday, June 12, 2024 at 05:31:16 PM GMT+3:30, Chris Evich <cevich@redhat.com> wrote:
>
>
>
>
>
>
> First off, you should not need to pass any special flags like --arch.
> This part is automatic unless you intentionally want to run another arch
> via emulation.  If so, you need Rosetta enabled, and the form should be
> "--arch amd64" (drop the "linux/" part).
>
> Note: I'm assuming your podman-machine is running the arm64 VM iamge
> (again, this should be automatic).
>
> What is also possibly happening is the image itself may not be built for
> ARM64.  Unfortunately the repo. seems to require auth, so I cannot check
> it for you.  You can verify what architectures are supported with the
> command (from inside the podman-machine vm, unless you have a native
> copy of skopeo):
>
> skopeo inspect --raw \
>    docker://ghcr.io/code-with-mehdi/rabbitmq:3-management \
>    | jq -re '.manifests[].platform.architecture'
>
> If that gives you a "jq" error, or no "arm64" in the output, then it's
> probably not a image manifest-list and/or not built for arm64.
>
> Hope that helps.
>
> ---
> Chris Evich (he/him)
> Senior Quality Assurance Engineer
> If there's a "hard-way", I'm the first one to implement it.
>
> On 6/12/24 09:39, Mehdi Haghgoo via Podman wrote:
>> Hi all,
>>
>> I'm trying to run rabbitmq images on MacBook M1 and I see warnings like:
>>
>> WARNING: image platform (linux/amd64) does not match the expected platform (linux/linux/arm64)
>>
>> I run the command:
>>
>> podman run --rm  -p 8000:8080  --arch linux/arm64 ghcr.io/code-with-mehdi/rabbitmq:3-management
>>
>> and it fails to boot with a lot of logs that I like below:
>>
>> Mozilla Community Pastebin/QTExU80S (Plain Text)
>>
>> Mozilla Community Pastebin/QTExU80S (Plain Text)
>>       
>> Is there a special flag I need to pass to fetch arm64 images?
>>
>> I'm not sure the boot issue has anything to do with the image arch incompatibility, though. Some enlightening on this from someone who has experience and insight will be appreciated.
>>
>> Best regards,
>> Mehdi
>>
>>
>>   
>> _______________________________________________
>> Podman mailing list -- podman@lists.podman.io
>> To unsubscribe send an email to podman-leave@lists.podman.io
>
> _______________________________________________
> Podman mailing list -- podman@lists.podman.io
> To unsubscribe send an email to podman-leave@lists.podman.io
>
_______________________________________________
Podman mailing list -- podman@lists.podman.io
To unsubscribe send an email to podman-leave@lists.podman.io