On Docker Build => standard_init_linux.go:190: exec user process caused "exec format error"

My dockerfile

Here is a photo of the Dockerfile trying to install libunwind8 (.net Core2 requerement).

I try to build docker (locally) and then I have receive this error …

$ docker build -t test .
Sending build context to Docker daemon  33.38MB
Step 1/6 : FROM resin/raspberry-pi-debian
latest: Pulling from resin/raspberry-pi-debian
e485920b0f83: Pull complete
61bc94ceadb2: Pull complete
7e88c0f82bf1: Pull complete
8427cc4400a5: Pull complete
9fb0e864fa2e: Pull complete
bbcfbd5da592: Pull complete
c689f1a0503f: Pull complete
b2cc8693f958: Pull complete
71cbe1fdb024: Pull complete
da0650675c82: Pull complete
bd1688cba618: Pull complete
Digest: sha256:4b874601f174cde3147da92417664d138c251fec74e083c6f667fec5cfa0cc8c
Status: Downloaded newer image for resin/raspberry-pi-debian:latest
 ---> 248c8313f621
Step 2/6 : WORKDIR /usr/src/app
Removing intermediate container c380addab5c6
 ---> 3ebff865f555
Step 3/6 : COPY . /usr/src/app
 ---> f3cf9bc6fe18
Step 4/6 : RUN apt-get update &&      apt-get install --no-install-recommends -y      libunwind8 gettext libicu57 liblttng-ust0 libcurl3 libssl1.0.2 libuuid1 unzip &&      apt-get clean && rm -rf /var/lib/apt/lists/*
 ---> Running in 9be71cc1504d
_**standard_init_linux.go:190: exec user process caused "exec format error"**_
_**The command '/bin/sh -c apt-get update &&      apt-get install --no-install-recommends -y      libunwind8 gettext libicu57 liblttng-ust0 libcurl3 libssl1.0.2 libuuid1 unzip &&      apt-get clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1**_

Do I understand correctly that you run docker build on your Laptop or PC? If this is the case then the problem is that docker runs on an x86 architecture, but the base image resin/raspberry-pi-debian is build for an arm architecture. If you want to build this locally, you need to emulate the arm architecture, you can use the resin cli to do that: https://docs.resin.io/reference/cli/#build-source-


Thank you very much
You guess right :smiley:

git push resin master:resin-emulated did the job.

Actually git push resin master should also work. Our builder will now what architecture it is and run the code on a native arm server, no need to tell it that it should emulate.

Ok i am confused a little bit,

I tried re-deploy to rpi-zero w withour resin-emulated,
But the docker failed when trying to download .Net Core Sdk.

When resin was emulated the deploy succeed but i am taking a segmantation fault.

I learned that .Net core is not available in rpi-zero w but i can not understand , why resin-emulated makes the deployment to succeed.

Anyway moving to rpi3 solved the problem.
Thanx for the help

I am getting the same or similar error when trying to run the following command:

sudo resin local push f12345b.local -s .


* Building..
- Stopping and removing any previous 'local-app' container
- Uploading build context & starting build...
Step 1/12 : FROM resin/raspberrypi3-node:6-slim
 ---> ac929deb06b0
Step 2/12 : RUN cross-build-start
 ---> Running in 1a8fe3b7f603
standard_init_linux.go:187: exec user process caused "exec format error"
Push failed. Error: The command 'cross-build-start' returned a non-zero code: 1 Error: The command 'cross-build-start' returned a non-zero code: 1
    at Stream.<anonymous> (/Users/redact/.nvm/versions/node/v6.10.3/lib/node_modules/resin-cli/node_modules/resin-sync/build/docker-utils.js:146:23)
    at emitOne (events.js:96:13)
    at Stream.emit (events.js:188:7)
    at drain (/Users/redact/.nvm/versions/node/v6.10.3/lib/node_modules/resin-cli/node_modules/through/index.js:36:16)
    at Stream.stream.queue.stream.push (/Users/redact/.nvm/versions/node/v6.10.3/lib/node_modules/resin-cli/node_modules/through/index.js:45:5)
    at Parser.parser.onToken (/Users/redact/.nvm/versions/node/v6.10.3/lib/node_modules/resin-cli/node_modules/JSONStream/index.js:130:18)
    at Parser.proto.write (/Users/redact/.nvm/versions/node/v6.10.3/lib/node_modules/resin-cli/node_modules/jsonparse/jsonparse.js:135:34)
    at Stream.<anonymous> (/Users/redact/.nvm/versions/node/v6.10.3/lib/node_modules/resin-cli/node_modules/JSONStream/index.js:21:12)
    at Stream.stream.write (/Users/redact/.nvm/versions/node/v6.10.3/lib/node_modules/resin-cli/node_modules/through/index.js:26:11)
    at IncomingMessage.ondata (_stream_readable.js:555:20)
    at emitOne (events.js:96:13)
    at IncomingMessage.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at IncomingMessage.Readable.push (_stream_readable.js:134:10)
    at HTTPParser.parserOnBody (_http_common.js:123:22)
    at Socket.socketOnData (_http_client.js:362:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:547:20)

FWIW my issue was solved here via GitHub.

1 Like