~fincham/static-binary-zoo

ref: e79e3898beb4586fb1a60be3f747649c0b38029e static-binary-zoo/Dockerfile.musl-cross-make -rw-r--r-- 997 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
18
19
20
21
22
23
24
25
26
27
28
29
ARG MUSL_TARGET=x86_64-linux-musl
FROM debian:bullseye
ARG MUSL_TARGET

ADD ./download /usr/local/bin

RUN mkdir /output && \
export DEBIAN_FRONTEND=noninteractive && \
sed -e 's/http:\/\/[^/]*/http:\/\/mirror.fsmg.org.nz/g' -i /etc/apt/sources.list && \
apt-get update && \
apt-get -y dist-upgrade && \
apt-get -y autoremove && \
apt-get install -y --no-install-recommends build-essential ca-certificates wget unzip flex bison autoconf file python3 && \
apt-get clean
RUN download https://github.com/richfelker/musl-cross-make/archive/refs/tags/v0.9.9.zip /tmp/musl-cross-make.zip 6cbe2f6ce92e7f8f3973786aaf0b990d0db380c0e0fc419a7d516df5bb03c891 && \
mkdir /build && \
cd /build && \
unzip /tmp/musl-cross-make.zip && \
cd musl-cross-make-* && \
cp config.mak.dist config.mak && \
echo "OUTPUT=/build/cross" >> config.mak && \
echo "TARGET=$MUSL_TARGET" >> config.mak && \
make -j $(nproc) && \
make install && \
cd .. && \
rm -rf musl-cross-make-* && \
rm /tmp/musl-cross-make.zip

CMD ["bash"]