Docker Community Forums

Share and learn in the Docker community.

Build a container for Arm Architecture

build
raspberrypi

(J3st3r666) #1

I’m trying to build an image from resin/rpi-raspbian:latest.
It works well locally, but I get this error when building on Docker Cloud:

standard_init_linux.go:178: exec user process caused "exec format error"
Removing intermediate container ...
The command '/bin/sh -c apt-get update' returned a non-zero code: 1
ERROR: Build failed: The command '/bin/sh -c apt-get update' returned a non-zero code: 1
ERROR: Build failed with exit code 2

Here is the Dockerfile portion:

FROM resin/rpi-raspbian:latest
# Enable systemd
ENV INITSYSTEM on

RUN apt-get update

If you change the RUN apt-get command with a different one (e.g. RUN chmod…) you get the same identical error, so the problem is not with the package manager.

Maybe Arm architecture-based images are not supported.
Is there a way to build them?

Thank you


(Zbay) #2

Just wondering were you able to get anywhere with this project? Did you find any documentation on this?


(E2thenegpii) #3

The error ‘standard_init_linux.go:178: exec user process caused “exec format error”’ happens when you’re trying to run an arm binary on x86 or vice-versa. The Docker Cloud servers are most undoubtedly x86 or x86_64 so in order to build an arm32v6 binary (as is required for Raspberry Pi) then you’ll need to look into running qemu-arm-static in you Raspberry Pi images.