Open killdayu opened 3 years ago
我这边构建是没问题的,是不是因为网络原因啊,有可能是 upx
因为网络原因导致的
=> ERROR [builder 5/6] RUN xz -d -c /usr/local/upx-3.96-amd64_linux.tar.xz | tar -xOf - upx-3.96-amd64_linux/upx > /bin/upx && chmod a+x /bin/upx 0.4s
[builder 5/6] RUN xz -d -c /usr/local/upx-3.96-amd64_linux.tar.xz | tar -xOf - upx-3.96-amd64_linux/upx > /bin/upx && chmod a+x /bin/upx:
14 0.418 /bin/sh: xz: not found
14 0.418 tar: short read
14 0.418 tar: upx-3.96-amd64_linux/upx: not found in archive
executor failed running [/bin/sh -c xz -d -c /usr/local/upx-3.96-amd64_linux.tar.xz | tar -xOf - upx-3.96-amd64_linux/upx > /bin/upx && chmod a+x /bin/upx]: exit code: 1 ERROR: Service 'proxypool' failed to build : Build failed
这个镜像没有xz和tar,需要安装。
方式:在Dockerfile文件中RUN xz -d -c /usr/local/upx-3.96-amd64_linux.tar.xz之前一行,插入
RUN apk add xz tar
=> ERROR [builder 5/6] RUN xz -d -c /usr/local/upx-3.96-amd64_linux.tar.xz | tar -xOf - upx-3.96-amd64_linux/upx > /bin/upx && chmod a+x /bin/upx 0.4s