Container Image app - Impossible to build snap base on core22 for architecture arm64

Hello,

I am trying to create a simple Container image App running Portainer.io o , It works fine to generate the snap for amd64 but it does not work for arm64. When I ask for it creates always an amd64. I don't find where is the problem.

In the snapcraft.yaml I have the following configuration base on core22

Inside my build snap script, I have the following :

When I run the script : ./build_snap.sh arm64

It always at the end create a file : docker-portainer_1.0_amd64.snap and I can not install it in my ctrlX3 because it is a amd64 format insted of arm64...

To make this snap I use a linux Ubuntu desktop version 22.04 running on virtual box 7.1.6

Additional informations : if I change snapcraft.yaml file to core20, I can now build the snap correctly in arm64 or amd64 format...

I checked snapcraft documentation : https://snapcraft.io/docs/reference-architectures

and it looks like there are a different command options to build a snap with core20 :

core22 :

But when I modify the snapcraft command with --build-for=arm64 it does not compile and refer to an error in snapcraft.yaml file.

Where could be my problem? How can I build my snap in arm64 format base on core22?

Thanks for any helps

2 replies