I use a the
BALENA_MACHINE_NAME variable to import the correct base image for my Raspberry Pi Zero.
Still the build tells that there is a version mismatch:
The requested image platform (linux/arm/v6) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
How can this happen if
BALENA_MACHINE_NAME is supposed to match the correct version?
RUN apt update -y; apt upgrade -y
RUN apt -y install build-essential
RUN pip install rpi-gpio==0.7.1 gpiozero==1.6.2
irrigation] Step 1/9 : FROM balenalib/raspberry-pi-python:3.11.2-build
[irrigation] ---> 7970438a150c
[irrigation] Step 2/9 : RUN apt update -y; apt upgrade -y
[irrigation] ---> [Warning] The requested image's platform (linux/arm/v6) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
thanks for your request.
This information is raised by the builder host which is not an arm/v6 but an arm64/8 hardware. Regardless of this, the arm64/v8 machine is capable of building the arm/v6 image properly.
As long as you don’t face any issue with the build image running on the designated hardware (raspberry pi zero) the image is a correctly build image.
One of the good parts of balena build are the clear logs.
This warning was confusing me. And it is appearing over and over.
Perhaps your explanation can be added to the documentation and in the tutorials to avoid confusion for new users.
when developing with balena you typically definte the desired python image and version in your dockerfile or docker-compose.yml file. yml to insure that the appropriate docker image for your target hardware used,
Furthermore, The ‘Balema_machine_name’ environment variable is typically used to ensure compatibility, with the hardware plateform you are targeting when building and running container on balenaOS.
The Python image used in a Balena container is determined by the Dockerfile or Docker Compose file in your project. You specify the desired Python base image and its version directly in those source. BALENA_MACHINE_NAME is not directly responsible for mapping to a specific Python image.