Skip to content

Commit

Permalink
Strip and compress
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanformigoni committed May 1, 2024
1 parent 50cc82d commit 719925f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

0 comments on commit 719925f

Please sign in to comment.