Skip to content
This repository was archived by the owner on Jun 20, 2026. It is now read-only.

Commit b3fee66

Browse files
authored
Add UPX file compression
1 parent c2f253a commit b3fee66

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ RUN --mount=type=cache,target=/var/cache/apk \
1818
build-base musl-dev pkgconf \
1919
openssl-dev openssl-libs-static \
2020
zlib-dev zlib-static \
21+
upx \
2122
&& update-ca-certificates
2223

2324
RUN set -eux; \
@@ -65,6 +66,12 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
6566
exit 1; \
6667
fi
6768

69+
RUN set -eux; \
70+
echo "=== Before UPX ===" && ls -lh /out/telemt; \
71+
upx --ultra-brute --preserve-build-id /out/telemt; \
72+
echo "=== After UPX ===" && ls -lh /out/telemt; \
73+
echo "=== Integrity check ===" && upx -t /out/telemt
74+
6875
FROM gcr.io/distroless/static:nonroot AS runtime
6976

7077
STOPSIGNAL SIGINT

0 commit comments

Comments
 (0)