This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.23.0-bookworm AS build | |
ARG upx_version=4.2.4 | |
RUN apt-get update && apt-get install -y --no-install-recommends xz-utils && \ | |
curl -Ls https://github.com/upx/upx/releases/download/v${upx_version}/upx-${upx_version}-amd64_linux.tar.xz -o - | tar xvJf - -C /tmp && \ | |
cp /tmp/upx-${upx_version}-amd64_linux/upx /usr/local/bin/ && \ | |
chmod +x /usr/local/bin/upx && \ | |
apt-get remove -y xz-utils && \ | |
rm -rf /var/lib/apt/lists/* |