我在Raspberry Pi3上安装了Docker。 我想安装"注册表"图片。由于我没有在ARM中找到它,我已经构建了AMR版本。
我从git https://github.com/docker/distribution/
重新编译了二进制文件我得到了一个功能二进制文件:
# registry --version
src_docker/go/bin/registry github.com/docker/distribution v2.6.0+unknown
然后我离开了git https://github.com/docker/distribution-library-image来自定义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 docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/etc/docker/registry/config.yml"]
我当然要更换"注册表/注册表"通过我编译的二进制文件。
我构建了图片:
docker build . -t ikise_arm/registry
但是当我执行图像时,它找不到二进制文件
# docker run -ti ikise_arm/registry:latest
/entrypoint.sh: exec: line 10: registry: not found
如果我禁用ENTRYPOINT并浏览文件,我会找到biary但不可能执行
# 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
你知道问题可能来自哪里吗?
答案 0 :(得分:0)