~fincham/static-binary-zoo

ref: e79e3898beb4586fb1a60be3f747649c0b38029e static-binary-zoo/Dockerfile.zlib-1.2.11 -rw-r--r-- 465 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://zlib.net/zlib-1.2.11.tar.gz source.tar.gz c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 && tar xf source.tar.gz
RUN export PATH=/build/cross/bin:$PATH && \
cd zlib-* && \
CC="$MUSL_TARGET-gcc" \
CFLAGS="-static -frandom-seed=pulse" \
./configure \
--prefix=/output \
--static && \
make -j$(nproc) && \
make install

CMD bash