Deploy pulling/pushing wrong arch of multi-arch images

We are deploying, using balena deploy, images that have been pre-pushed to docker hub. We deploy using docker-compose.yml files.

The issue we are seeing is that balena deploy doesn’t pull/push the right images to your registry. The symptom is exec format error.

The above screenshot is the result of the following docker-compose file:

version: "2"

services:
  # Database instance
  actyx:
    image: actyx/actyx@sha256:ba041c16786748cd30d334b5063c530a4052bc917ec4362cb49424479ff03324
    network_mode: "host"
    ports:
      - 4001:4001 # Swarm
      - 4458:4458 # Admin
      - 4454:4454 # API
    volumes:
      - actyx-data:/data
  kiosk:
    image: balenablocks/browser
    network_mode: "host"
    environment:
      - REMOTE_DEBUG_PORT=9222
      - KIOSK=1
      - SHOW_CURSOR=0
    ports:
      - 35173:35173
      - 9222:9222
    privileged: true
    depends_on:
      - app

volumes:
  actyx-data:
    driver: local

As you can see, the wrong architecture for balenablocks/browser was chosen.

I know that we can use the @digest format to select the right image, but that is extremely inconvenient since it means changing all relevant docker-compose.ymls whenever we push a new image.

How can I resolve this issue?

Hi Oliver,

Could you let me know:

  • what device type are you using?
  • what architecture is the fleet using (found in the fleet summary page)?
  • does the block run correctly if you use the @digest just for testing?

Thanks,
Phil

Hi @phil-d-wilson,

“Raspberry Pi 4 (using 64bit OS)”

Where do I find the arch? This is the summary…

Yes

Thanks for looking into this!
Oliver

Hello,

Just to let you know that the reference to browser block has changed. we now use the balenaHub registry. For now, the images are published as single architecture images. So for raspberry pi4 you can use bh.cr/balenablocks/browser-aarch64. You can find other available images here

This means you won’t run into the above issue. But for posterity, can you please share the command you are using for building your images? Perhaps you need the --emulated flag as documented here

Hope this is helpful

Thanks