~fincham/static-binary-zoo

ref: e79e3898beb4586fb1a60be3f747649c0b38029e static-binary-zoo/Dockerfile.busybox-1.33.1 -rw-r--r-- 609 bytes
e79e3898 — Michael Fincham Spelling 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ARG MUSL_TARGET=x86_64-linux-musl
FROM musl-cross-make-${MUSL_TARGET}
ARG MUSL_TARGET

WORKDIR /build
RUN download https://busybox.net/downloads/busybox-1.33.1.tar.bz2 source.tar.bz2 12cec6bd2b16d8a9446dd16130f2b92982f1819f6e1c5f5887b6db03f5660d28 && tar xf source.tar.bz2
RUN export PATH=/build/cross/bin:$PATH && \
mkdir -p /output/bin && \
cd busybox-* && \
export CFLAGS="-frandom-seed=pulse -I/output/include" && \
export LDFLAGS="--static -L/output/lib" && \
make defconfig && \
make CROSS_COMPILE="$MUSL_TARGET-" -j$(nproc) && \
$MUSL_TARGET-strip busybox && \
cp busybox /output/bin/busybox

CMD bash