Docker build error "exec format error"

I am trying to build home assistant from the github masterbranch clone in docker and I get this error. I don’t know what it means, any clues?

pi@raspberrypi:~/home-assistant_dev $ docker build .
Sending build context to Docker daemon  19.83MB
Step 1/11 : FROM python:3.6
 ---> 968120d8cbe8
Step 2/11 : MAINTAINER Paulus Schoutsen <[email protected]>
 ---> Using cache
 ---> a0ceb625458e
Step 3/11 : VOLUME /config
 ---> Using cache
 ---> 8c8dd0bfe1c1
Step 4/11 : RUN mkdir -p /usr/src/app
 ---> Running in 22332f0c4d37
standard_init_linux.go:187: exec user process caused "exec format error"
The command '/bin/sh -c mkdir -p /usr/src/app' returned a non-zero code: 1

You are propably using an x86 python base container on an arm machine.
Thats the part where the docker magic ends. Try one of the alpine arm images and install python with apk.

Docker that mean i have to modify the Dockerfile?

# Notice:
# When updating this file, please also update virtualization/Docker/Dockerfile.dev
# This way, the development image and the production image are kept in sync.

FROM python:3.6
MAINTAINER Paulus Schoutsen <[email protected]>

# Uncomment any of the following lines to disable the installation.
#ENV INSTALL_TELLSTICK no
#ENV INSTALL_OPENALPR no
#ENV INSTALL_FFMPEG no
#ENV INSTALL_LIBCEC no
#ENV INSTALL_PHANTOMJS no
#ENV INSTALL_COAP_CLIENT no
#ENV INSTALL_SSOCR no

VOLUME /config

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# Copy build scripts
COPY virtualization/Docker/ virtualization/Docker/
RUN virtualization/Docker/setup_docker_prereqs

# Install hass component dependencies
COPY requirements_all.txt requirements_all.txt

# Uninstall enum34 because some depenndecies install it but breaks Python 3.4+.
# See PR #8103 for more info.
RUN pip3 install --no-cache-dir -r requirements_all.txt && \
    pip3 install --no-cache-dir mysqlclient psycopg2 uvloop cchardet

# Copy source
COPY . .

CMD [ "python", "-m", "homeassistant", "--config", "/config" ]

Ended up pulling this docker image:
https://hub.docker.com/r/lroguet/rpi-home-assistant/

This just works.

Building from a clone of the HA repo github doesn’t work because of the error above. Guess you are probably right about the arm architecture of the pi causing errors, I don’t really know enough about how to create docker files to figure it out.

Cheers.