Build failing in Bitbucket Pipeline


I am using Bitbucket pipeline to build and deploy our apps. I’ve encountered a new issue with two of the them which were working before. Now the build fails and I get this in the logs:

 [Warning] The requested image's platform (linux/arm/v8) does not match the detected host platform (linux/amd64/v4) and no specific platform was requested

Then I get

 exec /bin/sh: exec format error

Any suggestion on how to solve the issue? I tried to add --platform=linux/arm/v8 after the FROM but it didn’t change anything.

The pipeline:

    - step:
        name: Build Balena
        image: node:20
          - node
          - npm install -g balena-cli
          - balena login --token $BALENA_CREDS
          - balena build -f my-fleet
          - docker

The DockerFile:

FROM balenalib/raspberrypicm4-ioboard-python:3.10-build
WORKDIR /usr/src/app

COPY . /usr/src/app/
COPY ./ /usr/src/app/

RUN apt update &&\
    apt install fbi \
                unzip \
                python-setuptools \
                python3-setuptools \
RUN pip3 install -r /usr/src/app/requirements/prod.txt

CMD ["./"]

I’ve seen here Balena CLI suddenly fail: "The requested image's platform (linux/amd64) does not match the detected host platform" that it could happen with some broken builders. We don’t have a fixed version of the cli in our pipeline and I’ve seen that 18.0.0 had been released recently. Do you think that could be the issue @mpous ?