Balena with Concourse (run ARM container)

Hi!

Currently i am facing the task of building an application for a balena app (armv7hf) with concourse CI (amd64).
I already posted a question at the concourse forums (https://discuss.concourse-ci.org/t/running-arm-image-with-concourse-on-amd64/1716/3) and thought it would be useful to ask from this side as well.

Long story short:
Does anybody can tell me why this pipeline does not run using the official balena ubuntu base image for armv7hf?

resources:
- name: base-image
  type: docker-image
  source:
    repository: balenalib/armv7hf-ubuntu
    tag: bionic

jobs:
- name: arm_test
  plan:
  - get: base-image
    trigger: true
  - task: run
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
          repository: balenalib/armv7hf-ubuntu
          tag: bionic
      run:
        path: /bin/bash
        args:
          - -c
          - |
            uname -a

I get this error in concourse:

Backend error: Exit status: 500, message: {"Type":"","Message":"runc exec: exit status 1: exec failed: container_linux.go:345: starting container process caused \"exec format error\"\n","Handle":"","ProcessID":"","Binary":""}

However running the same on my local machine works:

$ docker run -it --rm $REGISTRY/elbb/armv7hf/ubuntu/bionic/base /bin/bash
Starting with UID : 9001
user@9ab2026141c7:/$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
user@9ab2026141c7:/$ 

@arschlegel Hi there. An exec format error looks like an architecture mismatch issue in this case. You should be able to use balenalib/amd64-ubuntu on an amd64 arch based app, or use an arm concourse worker.

use an arm concourse worker.

That sounds like what i need. Can you give me any information about this?

@arschlegel That looks like something for the concourse forum :). Cheers!

FYI: I managed running the armv7hf image on amd64 using concourse by simply installing apt-get install binfmtc qemu qemu-user-static on the host that runs the concourse containers. Those were the same requirements needed on my local host. I just forgot to install them.

Hey @arschlegel thanks for following up on this.