docker-upx
is a docker ready image for UPX with a statically pre-built version that you can call directly:
docker run -it --rm gcavalcante8808/upx:v4.2.2 --version
Or use it on a Dockerfile to copy the upx binary:
FROM gcavalcante8808/upx:v4.2.2 as upx
FROM python:3.12-slim
COPY --from=upx /usr/local/bin/upx /usr/local/bin/upx
RUN /usr/local/bin/upx --version
Author: Gabriel Cavalcante (gabriel.cavalcante88 at gmail.com)