Docker-entrypoint.sh导致使用golang的ARM映像“未找到”

My problem is that I get an error when running my container on an ARM arch system(RaspberryPI with Raspbian). Image was built on that same Raspberry.

This is my dockerfile:

FROM arm32v7/golang

COPY qemu-arm-static /usr/bin

ENV STATUSOK_VERSION 0.1.1

RUN apt-get update \
    && apt-get install -y unzip \
    && wget https://github.com/sanathp/statusok/releases/download/$STATUSOK_VERSION/statusok_linux.zip \
    && unzip statusok_linux.zip \
    && mv ./statusok_linux/statusok /go/bin/StatusOk \
    && rm -rf ./statusok_linux* \
    && apt-get remove -y unzip git \
    && apt-get autoremove -y \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

VOLUME /config
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT /docker-entrypoint.sh

I'm able to succesfully build this on a RaspberryPI running Raspbian:

root@raspberrypi:~/armstatusok# docker build . -t armstatusok
Sending build context to Docker daemon  6.656kB
Step 1/7 : FROM arm32v7/golang
 ---> 8bbfdfd01a06
Step 2/7 : COPY qemu-arm-static /usr/bin
 ---> Using cache
 ---> 2572fd1e03a0
Step 3/7 : ENV STATUSOK_VERSION 0.1.1
 ---> Using cache
 ---> 25d39a4c6eb5
Step 4/7 : RUN apt-get update     && apt-get install -y unzip     && wget https://github.com/sanathp/statusok/releases/download/$STATUSOK_VERSION/statusok_linux.zip     && unzip statusok_linux.zip     && mv ./statusok_linux/statusok /go/bin/StatusOk     && rm -rf ./statusok_linux*     && apt-get remove -y unzip git     && apt-get autoremove -y     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 ---> Using cache
 ---> bfb1cfa9a985
Step 5/7 : VOLUME /config
 ---> Using cache
 ---> 3bfbce28329b
Step 6/7 : COPY ./docker-entrypoint.sh /docker-entrypoint.sh
 ---> Using cache
 ---> a1795ca4f40c
Step 7/7 : ENTRYPOINT /docker-entrypoint.sh
 ---> Using cache
 ---> d0ce74911ba3
Successfully built d0ce74911ba3
Successfully tagged armstatusok:latest

Next step is to run it, and where I get into trouble:

root@raspberrypi:~/armstatusok# docker run --name=armstatusok -v $PWD:/config armstatusok
/docker-entrypoint.sh: 1: /docker-entrypoint.sh: /go/bin/StatusOk: not found

I went into the container commenting line one of the docker-entrypoint.sh and checked if /go/bin/StatusOk was actually there, and it was.

My docker-entrypoint.sh:

root@raspberrypi:~/armstatusok# cat docker-entrypoint.sh
/go/bin/StatusOk --config /config/config.json

Now my question is, does anybody have a clue where to start? I also tested this dockerfile on x86 arch, and there it worked. I only changed the FROM line to the x86 flavour and removed the COPY qemu-arm-static /usr/bin since that line is there to make it work on ARM arch, according to documentation.

I copied this Dockerfile and start script verbatim and it builds and runs perfectly for me. I get

Config file not present at the given location: /config/config.json give correct file location using --config parameter

because I don't have access to the config file you're using. But the fact I get that message means that StatusOk is running. So I don't know what to suggest.

The only difference I made was to add a shebang #!/bin/sh to the start of the docker-entrypoint.sh file, and ensure it has execute permission, by running ls -al, and if it doesn't have x in the permissions, running chmod +rwx. Don't know if that made any difference as to how the script tried to access /go/bin/StatusOk.

enter image description here

Full docker-entrypoint.sh contents:

#!/bin/sh
/go/bin/StatusOk --config /config/config.json