Sh : file not found on alpine Docker image

I installed Docker on my Raspberry Pi3.
I want to install the “registry” image. As I do not find it in ARM, I have built an AMR version.

I recompiled the binary from the git

  • websphere liberty on docker container
  • How get the number of pulls of a docker tag?
  • gcloud docker documentation might need an update
  • Error: docker daemon is not running. [/bin/lib/]
  • Backup a postgres Container with its databases
  • Can't access publicly exposed Docker container port from external machine, only from localhost?
  • I get a functional binary:

    # registry --version
    src_docker/go/bin/registry v2.6.0+unknown

    Then I left the git to customize the Dockerfile.

    FROM arm32v6/alpine:3.5
    RUN set -ex \
       && apk add --no-cache ca-certificates apache2-utils
    COPY ./registry/registry /bin/registry
    COPY ./registry/config-example.yml /etc/docker/registry/config.yml
    VOLUME ["/var/lib/registry"]
    EXPOSE 5000
    COPY /
    ENTRYPOINT ["/"]
    CMD ["/etc/docker/registry/config.yml"]

    I have of course to replace the “registry / registry” by the binary that I compiled.

    I build image :

    docker build . -t ikise_arm/registry

    But when I execute the image it does not find the binary

    # docker run -ti ikise_arm/registry:latest
    / exec: line 10: registry: not found

    If I disable the ENTRYPOINT and explore the files I find the biary but impossible to execute

    # docker run -ti ikise_arm/registry:latest
    / # ls -al /bin/r*
    lrwxrwxrwx    1 root     root            12 Mar  2 20:19 /bin/reformime -> /bin/busybox
    -rwxr-xr-x    1 root     root      19940588 Jun 14 12:27 /bin/registry
    lrwxrwxrwx    1 root     root            12 Mar  2 20:19 /bin/rev -> /bin/busybox
    lrwxrwxrwx    1 root     root            12 Mar  2 20:19 /bin/rm -> /bin/busybox
    lrwxrwxrwx    1 root     root            12 Mar  2 20:19 /bin/rmdir -> /bin/busybox
    lrwxrwxrwx    1 root     root            12 Mar  2 20:19 /bin/run-parts -> /bin/busybox
    / # /bin/registry
    sh: /bin/registry: not found

    Do you have any idea where the problem may come from?

  • docker run <image> : /usr/bin/env: ruby.exe : No such file or directory
  • Explanation of the “--upgrade add” command for Alpine Linux
  • Why systemd process running in docker container with PID 1 not forwarding SIGTERM to child processes on docker stop
  • How to use the Docker Build Step Jenkins plugin?
  • Does Docker purge old/unused images?
  • how to cross docker-compose.yml file to link container
  • One Solution collect form web for “Sh : file not found on alpine Docker image”

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.