命令如下lzc-docker history –no-trunc registry.lazycat.cloud/lzc/lzcapp:3.20.3,能够看到是 Alpine 作为 base image,然后更换中科大的源,以及安装 gcompat 以兼容 glibc 程序。
1 2 3 4 5 6 7
(base) lzcbox-029c588e ~ # lzc-docker history --no-trunc registry.lazycat.cloud/lzc/lzcapp:3.20.3 IMAGE CREATED CREATED BY SIZE COMMENT sha256:ba7a533c869a26d89e83bdc5ddb978df5a3502ac91452422a649d0d3cf52190b 7 months ago RUN /bin/sh -c apk add gcompat # buildkit 2.48MB buildkit.dockerfile.v0 <missing> 7 months ago RUN /bin/sh -c sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories # buildkit 97B buildkit.dockerfile.v0 <missing> 9 months ago CMD ["/bin/sh"] 0B buildkit.dockerfile.v0 <missing> 9 months ago ADD alpine-minirootfs-3.20.3-x86_64.tar.gz / # buildkit 7.8MB buildkit.dockerfile.v0 (base) lzcbox-029c588e ~ #
甚至可以看到,这个 image 是连 bash 以及各种开发运行时都没有的。
1 2 3 4 5 6 7 8 9 10 11 12
(base) lzcbox-029c588e ~ # lzc-docker run -it registry.lazycat.cloud/lzc/lzcapp:3.20.3 bash docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "bash": executable file not found in $PATH: unknown. (base) lzcbox-029c588e ~ # lzc-docker run -it registry.lazycat.cloud/lzc/lzcapp:3.20.3 sh / # go sh: go: not found / # npm sh: npm: not found / # pip sh: pip: not found / # python sh: python: not found / #