From 719925f0f985cb7d29e8f938f4e04dd149e35d1f Mon Sep 17 00:00:00 2001 From: "Ruan E. Formigoni" Date: Wed, 1 May 2024 16:07:37 -0300 Subject: [PATCH] Strip and compress --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 15b17de0..b3beb1d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ FROM alpine:latest RUN apk add --no-cache git gcc make musl-dev autoconf automake libtool ninja \ - linux-headers bash meson cmake pkgconfig libcap-static libcap-dev libselinux-dev libxslt + linux-headers bash meson cmake pkgconfig libcap-static libcap-dev \ + libselinux-dev libxslt upx RUN git clone https://github.com/ruanformigoni/bubblewrap @@ -14,3 +15,9 @@ RUN ninja -C build bwrap.p/bubblewrap.c.o bwrap.p/bind-mount.c.o bwrap.p/network WORKDIR build RUN cc -o bwrap bwrap.p/bubblewrap.c.o bwrap.p/bind-mount.c.o bwrap.p/network.c.o bwrap.p/utils.c.o -static -L/usr/lib -lcap -lselinux + +# Strip +RUN strip -s -R .comment -R .gnu.version --strip-unneeded bwrap + +# Compress +RUN upx --ultra-brute --no-lzma bwrap