From b730ab3d306726c31e6f711105197a1e7c6a9562 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Mon, 17 Oct 2022 20:56:13 +0800 Subject: [PATCH] build: update upx compile --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3594935..481936f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,12 @@ ARG GOLANG="golang:1.19-alpine3.16" FROM ${ALPINE} AS upx RUN apk add build-base cmake git -RUN git clone https://github.com/dnomd343/upx.git +RUN git clone https://github.com/dnomd343/upx.git --depth=1 WORKDIR ./upx/ RUN git submodule update --init && rm -rf ./.git/ -RUN make UPX_CMAKE_CONFIG_FLAGS=-DCMAKE_EXE_LINKER_FLAGS=-static && \ - mv ./build/release/upx /tmp/ && strip /tmp/upx +RUN make UPX_CMAKE_CONFIG_FLAGS=-DCMAKE_EXE_LINKER_FLAGS=-static +WORKDIR ./build/release/ +RUN strip upx && mv upx /tmp/ FROM ${GOLANG} AS xray ENV XRAY="1.6.0"