rust-musl-builder/examples/adding-a-library/Dockerfile

18 lines
523 B
Docker
Raw Normal View History

# -*- mode: dockerfile -*-
#
# An example Dockerfile showing how to add new static C libraries using
# musl-gcc.
FROM ekidd/rust-musl-builder
# Build a static copy of zlib.
2017-09-26 13:26:46 +00:00
#
# EXAMPLE ONLY! libz is already included.
2017-02-21 19:29:23 +00:00
RUN VERS=1.2.11 && \
cd /home/rust/libs && \
curl -LO http://zlib.net/zlib-$VERS.tar.gz && \
tar xzf zlib-$VERS.tar.gz && cd zlib-$VERS && \
CC=musl-gcc ./configure --static --prefix=/usr/local/musl && \
make && sudo make install && \
cd .. && rm -rf zlib-$VERS.tar.gz zlib-$VERS