# On Docker Build =\> standard\_init\_linux.go:190: exec user process caused "exec format error"

**URL:** <https://forums.balena.io/t/on-docker-build-standard-init-linux-go-exec-user-process-caused-exec-format-error/3125>\
**Category:** Product support\
**Tags:** docker\
**Created:** [May 10, 2018, 3:07pm UTC](https://forums.balena.io/t/on-docker-build-standard-init-linux-go-exec-user-process-caused-exec-format-error/3125 "2018-05-10T15:07:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![StPAulis](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/stpaulis/32/1438_2.png) [@StPAulis](https://forums.balena.io/u/StPAulis)\
**Post date:** [May 10, 2018, 3:07pm UTC](https://forums.balena.io/t/on-docker-build-standard-init-linux-go-exec-user-process-caused-exec-format-error/3125/1 "2018-05-10T15:07:08Z")

</div>

My dockerfile

 ![resinCoreExample](https://global.discourse-cdn.com/balena/original/1X/e68fc202ab82daff5ececffcb484d3a32fb098de.png)

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 …

```auto
$ 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** _

```

---

<div class="post-metadata">

**Author:** ![afitzek](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/afitzek/32/359_2.png) [@afitzek](https://forums.balena.io/u/afitzek)\
**Post date:** [May 11, 2018, 1:36pm UTC](https://forums.balena.io/t/on-docker-build-standard-init-linux-go-exec-user-process-caused-exec-format-error/3125/4 "2018-05-11T13:36:18Z")

</div>

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-](https://docs.resin.io/reference/cli/#build-source-)

---

<div class="post-metadata">

**Author:** ![StPAulis](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/stpaulis/32/1438_2.png) [@StPAulis](https://forums.balena.io/u/StPAulis)\
**Post date:** [May 11, 2018, 2:35pm UTC](https://forums.balena.io/t/on-docker-build-standard-init-linux-go-exec-user-process-caused-exec-format-error/3125/5 "2018-05-11T14:35:38Z")

</div>

Thank you very much  
You guess right 😃

**_git push resin master:resin-emulated_** did the job.

---

<div class="post-metadata">

**Author:** ![afitzek](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/afitzek/32/359_2.png) [@afitzek](https://forums.balena.io/u/afitzek)\
**Post date:** [May 11, 2018, 2:42pm UTC](https://forums.balena.io/t/on-docker-build-standard-init-linux-go-exec-user-process-caused-exec-format-error/3125/6 "2018-05-11T14:42:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![StPAulis](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/stpaulis/32/1438_2.png) [@StPAulis](https://forums.balena.io/u/StPAulis)\
**Post date:** [May 13, 2018, 2:40pm UTC](https://forums.balena.io/t/on-docker-build-standard-init-linux-go-exec-user-process-caused-exec-format-error/3125/8 "2018-05-13T14:40:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![eczajkowski](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/eczajkowski/32/665_2.png) [@eczajkowski](https://forums.balena.io/u/eczajkowski)\
**Post date:** [May 21, 2018, 5:15pm UTC](https://forums.balena.io/t/on-docker-build-standard-init-linux-go-exec-user-process-caused-exec-format-error/3125/9 "2018-05-21T17:15:37Z")

</div>

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

`sudo resin local push f12345b.local -s .`

Output:

```auto
* 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)

```

---

<div class="post-metadata">

**Author:** ![eczajkowski](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/eczajkowski/32/665_2.png) [@eczajkowski](https://forums.balena.io/u/eczajkowski)\
**Post date:** [May 24, 2018, 5:50pm UTC](https://forums.balena.io/t/on-docker-build-standard-init-linux-go-exec-user-process-caused-exec-format-error/3125/10 "2018-05-24T17:50:08Z")

</div>

FWIW my issue was solved [here via GitHub](https://github.com/resin-io/resin-cli/issues/880#issuecomment-391687588).
