3

I have very little experience with docker, but I'm trying to create automated build for my library using gitlab-ci and a docker image.

I want it to be build for raspberrypi so I found an docker image (here) and I have created a github repository with Dockerfile.

In next step I have created an automated build in dockerhub, but build fails with following error:

Build failed: rpc error: code = 2 desc = "oci runtime error: exec format error"

I couldn't find any help in the documentation and also nothing on google so I'm asking:
Do you know what causes this error?

My Dockerfile:

FROM resin/rpi-raspbian:wheezy-20160518
MAINTAINER lewicki.pk@gmail.com

RUN apt-get update && apt-get install -y \
        automake \
        cmake \
        g++ \
        git \
        libboost-all-dev \
        libi2c-dev \
        libjsoncpp-dev \
        libpcre3-dev \
        libssl-dev \
        libtool \
        make \
        openssl \
        pkg-config \
        wget \
        && apt-get clean

And the log from docker:

Starting build of index.docker.io/piotrlewicki/gitlab-ci_rpi-image:latest...
Step 1 : FROM resin/rpi-raspbian:wheezy-20160518 ---> aefd4527968f
Step 2 : MAINTAINER lewicki.pk@gmail.com
---> Running in a463aace5c5a
---> c5eedf34e43c Removing intermediate container a463aace5c5a
Step 3 : RUN apt-get update && apt-get install -y automake cmake g++ git libboost-all-dev libi2c-dev libjsoncpp-dev libpcre3-dev libssl-dev libtool make openssl pkg-config wget && apt-get clean
---> Running in 318905fb5329 Removing intermediate container 318905fb5329
rpc error: code = 2 desc = "oci runtime error: exec format error"
lewiatan
  • 1,126
  • 2
  • 21
  • 37
  • I launched the exact same Dockerfile and I have no error what so ever. Do you have an `ENTRYPOINT` or `CMD` after that ? This error is more related to an `ENTRYPOINT` script with no shebang http://stackoverflow.com/questions/36653486/docker-error-response-from-daemon-rpc-error-code-2-desc-oci-runtime-erro – β.εηοιτ.βε May 19 '16 at 12:29
  • Previously I had 3 lines of comments below this, but I have removed them later and the result was the same. I'll try again- maybe something was cached... – lewiatan May 19 '16 at 12:32
  • Still the same problem. Here's the build output: https://hub.docker.com/r/piotrlewicki/gitlab-ci_rpi-image/builds/bcqn4ozzr4xx7ef8tg8adrb/ – lewiatan May 19 '16 at 12:34

1 Answers1

8

It's not an issue.
Docker Hub simply does not support image builds for other architectures than x86.
Mine was ARM.

Below response from Docker support:

The image that your build is based upon, resin/rpi-raspbian:wheezy-20160518, is an ARM-based image. Cross architecture image builds are not supported on Docker Hub. Only x86-based images can be built in Docker Hub/Cloud.

lewiatan
  • 1,126
  • 2
  • 21
  • 37
  • Support is supposedly on the way but it has yet to make it's way into all tools: https://integratedcode.us/2016/04/22/a-step-towards-multi-platform-docker-images/ – jkp Aug 28 '16 at 20:23