open-balena-admin icon indicating copy to clipboard operation
open-balena-admin copied to clipboard

How to build the containers on arm32v7 or arm64?

Open bernhardkaindl opened this issue 3 years ago • 1 comments

When I try to compose the containers on an armhf machine, I get these errors (as they are amd64 builds):

postgrest_1  | exec /bin/bash: exec format error
ui_1         | exec /bin/bash: exec format error
remote_1     | exec /bin/bash: exec format error

Can I build armhf or arm64 images of containers on armhf or arm64?

It looks like this would be a start:

for container in postgrest ui remote; do
  c=open-balena-$container
  git clone [email protected]/dcaputo-harmoni/$c.git
  docker build -t $c $c/
done

Then collect the new image ids and use them of the docker-compose suing sed 's|dcaputo-harmoni/||' compolse/services.yml

bernhardkaindl avatar Apr 16 '22 13:04 bernhardkaindl

@bernhardkaindl thank you for the PR’s! With your commit to the open-balena-postgrest I am assuming the containers will now build on arm32v7/arm64? If so I would be happy to post arm builds as well. We should probably have an option in the quickstart script to specify the target architecture as well? Curious how the base open-balena packages handle different architectures as we could always mirror that, I’ve always run them on amd64.

dcaputo-harmoni avatar Apr 16 '22 20:04 dcaputo-harmoni