堆垛机,
我正在使用 Docker 容器化我的应用程序。在下面的阶段,我正在尝试使用UPX打包它。
FROM alpine:3.8 AS compressor
# Version of upx to be used(without the 'v' prefix)
# For all releases, see https://github.com/upx/upx/releases
ARG UPX_VERSION=3.94
# Fetch upx, decompress it, make it executable.
ADD https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz /tmp/upx.tar.xy
RUN tar -xJOf /tmp/upx.tar.xy upx-${UPX_VERSION}-amd64_linux/upx > /usr/local/bin/upx \
&& chmod +x /usr/local/bin/upx
COPY --from=builder /usr/local/bin/ace /usr/local/bin/ace
RUN /usr/local/bin/upx --overlay=strip --best /usr/local/bin/ace
问题是当我构建图像时出现以下错误:
命令 '/bin/sh -c /usr/local/bin/upx --overlay=strip --best /usr/local/bin/ace' 返回一个非零代码:127
出于某种原因,容器无法将 upx 识别为可执行文件!谁能给我一些指示?