Standard_init_linux.go:211: exec user process caused "exec format error"

Hi,
I am using balena-cli version 11.6.1

I have a dockerfile like below.

FROM balenalib/beaglebone-black:jessie

ENV INITSYSTEM on
ENV DBUS_SYSTEM_BUS_ADDRESS unix:path=/host/run/dbus/system_bus_socket
WORKDIR /etc/apt
RUN rm -rf /etc/apt/sources.list

When I try to build using
/balena-cli/balena build --deviceType beaglebone-black --arch armv7hf --logs
I get the error
standard_init_linux.go:211: exec user process caused "exec format error"

When I replace the FROM to
FROM debain:jessie
and run a local docker build, i get no errors and am able to create the image successfully.

Has it something to do with the permissions, or the base image or something else?
Pleas help.

Hi,
I think the problem here is the base image, as you are running this container locally I assume you have an x86/64 machine, but you are trying to run an arm based image. Try using a x86 base image to run on your local environment.
Kind regards,
Theodor

Hi there,

I’ve just tried this with your Dockerfile from my dev machine using balena-cli v11.7.3, with no issues:

Heds-Balena-Machine:bbb heds$ balena build --deviceType beaglebone-black --arch armv7hf --logs
[Info]    Creating default composition with source: /Work/tmp/bbb
[Info]    Building for armv7hf/beaglebone-black
[Build]   Building services...
[Build]   main Preparing...
[Build]   main Step 1/5 : FROM balenalib/beaglebone-black:jessie
[Build]   main  ---> f4521d05e437
[Build]   main Step 2/5 : ENV INITSYSTEM on
[Build]   main  ---> Running in c580214dc58e
[Build]   main Removing intermediate container c580214dc58e
[Build]   main  ---> 5d77a5a9bf3a
[Build]   main Step 3/5 : ENV DBUS_SYSTEM_BUS_ADDRESS unix:path=/host/run/dbus/system_bus_socket
[Build]   main  ---> Running in c7af67a0b96e
[Build]   main Removing intermediate container c7af67a0b96e
[Build]   main  ---> bdc2837c7980
[Build]   main Step 4/5 : WORKDIR /etc/apt
[Build]   main  ---> Running in 9ab3c29c0ee6
[Build]   main Removing intermediate container 9ab3c29c0ee6
[Build]   main  ---> aabb7dbce642
[Build]   main Step 5/5 : RUN rm -rf /etc/apt/sources.list
[Build]   main  ---> Running in 474ad7d33a8f
[Build]   main Removing intermediate container 474ad7d33a8f
[Build]   main  ---> ff1b699a2b73
[Build]   main Successfully built ff1b699a2b73
[Build]   main Successfully tagged bbb_main:latest
[Build]   main Waiting...
[Build]   Built 1 service in 0:33
[Success] Build succeeded!

Could you please try with the latest version of balena-cli (v11.7.3), and if this still fails, inform us of:

  • OS you’re running balena-cli on (ie. Linux, Ubuntu 18.08)
  • Architecture of the OS you’re running balena-cli (ie. AMD64 or Armv7)

This should help us try and create a better test case to attempt this on. It sounds, from the error message you’re getting back, that either Docker isn’t trying to emulate the Arm architecture whilst building, or it’s attempting to be built under an architecture that isn’t compatible with the dev machine.

Best regards, Heds