From dcc9488079170b97c59b89c36c64d4d59c392585 Mon Sep 17 00:00:00 2001 From: Jocelyn Le Sage Date: Sun, 11 Feb 2024 17:06:21 -0500 Subject: [PATCH] Use pre-compiled, statically linked version of UPX. --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7cd53ee..8d1363c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,13 +28,13 @@ ARG DEBIAN_PKGS="\ # Get Dockerfile cross-compilation helpers. FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx -# Build UPX. -FROM --platform=$BUILDPLATFORM alpine:3.15 AS upx -RUN apk --no-cache add build-base curl make cmake git && \ +# Get UPX (statically linked). +FROM --platform=$BUILDPLATFORM alpine:3.18 AS upx +ARG UPX_VERSION=4.2.2 +RUN apk --no-cache add curl && \ mkdir /tmp/upx && \ - curl -# -L https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-src.tar.xz | tar xJ --strip 1 -C /tmp/upx && \ - make -C /tmp/upx build/release-gcc -j$(nproc) && \ - cp -v /tmp/upx/build/release-gcc/upx /usr/bin/upx + curl -# -L https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz | tar xJ --strip 1 -C /tmp/upx && \ + cp -v /tmp/upx/upx /usr/bin/upx # Build TigerVNC server. FROM --platform=$BUILDPLATFORM alpine:3.15 AS tigervnc