DockerHub Build for Arm etc - can't downloaded qemu

I’d trying to get automated build for arm as well as amd64.

The structure of my project is:

code.py
Docker
   Dockerfile
   Dockerfile.arm32v7
   hooks
      pre_build
      post_checkout

In post_checkout I’ve got the download of qemu (the arm binaries). As far as i can tell it’s going to the Docker directory.

In pre_build qemu is registered.

Then in the docker file I have COPY qemu-arm-static /usr/bin/

So looking at the docker hub logs, I can see the qemu being downloaded, and registered.
But when it gets to the docker build command, it can’t find qemu-arm-static.

Starting build of index.docker.io/psyciknz/paradoxip:dev-arm64v8-latest...
Step 1/12 : FROM arm64v8/python:2.7.15-jessie
---> 3d1900519aa4
Step 2/12 : COPY qemu-aarch64-static /usr/bin/
COPY failed: stat /var/lib/docker/tmp/docker-builder077639436/qemu-aarch64-static: no such file or directory

I’ve tried updating the DockerFile to ‘COPY Docker/qemu-arm-static /usr/bin/’ but it didn’t help… but I updated my post_checkout to add PWD and LS, I can can definitely figure out that it has run that script from the Docker directory. But I can’t figure out where build it run from to get the qemu to the right location.

Any pointers?

I think I’ve finally got further, but now it falls over in the build with a permission denied. Something that does not happen when I build (with qemu also) on my local amd64 machine.

Starting build of index.docker.io/psyciknz/paradoxip:dev-arm64v8-latest...
Step 1/12 : FROM arm64v8/python:2.7.15-jessie
 ---> 3d1900519aa4
Step 2/12 : COPY qemu-aarch64-static /usr/bin/qemu-aarch64-static
 ---> e8bac2adbb6d
Step 3/12 : RUN pip install paho-mqtt requests
 ---> Running in 9a754120d539
standard_init_linux.go:190: exec user process caused "permission denied"
Removing intermediate container 9a754120d539
The command '/bin/sh -c pip install paho-mqtt requests' returned a non-zero code: 1

On my local:

Sending build context to Docker daemon  16.59MB
Step 1/12 : FROM arm64v8/python:2.7.15-jessie
 ---> 3d1900519aa4
Step 2/12 : COPY qemu-aarch64-static /usr/bin/qemu-aarch64-static
 ---> 25de60ea4f37
Step 3/12 : RUN pip install paho-mqtt requests
 ---> Running in 99d012beced0
Collecting paho-mqtt