2016-04-16 14:00:12 +00:00
|
|
|
# -*- mode: dockerfile -*-
|
|
|
|
#
|
|
|
|
# An example Dockerfile showing how to add new static C libraries using
|
|
|
|
# musl-gcc.
|
|
|
|
|
2016-04-17 11:41:55 +00:00
|
|
|
FROM ekidd/rust-musl-builder
|
2016-04-16 14:00:12 +00:00
|
|
|
|
|
|
|
# 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 && \
|
2016-04-17 11:41:55 +00:00
|
|
|
cd /home/rust/libs && \
|
2016-04-16 14:00:12 +00:00
|
|
|
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 && \
|
2016-04-17 11:41:55 +00:00
|
|
|
cd .. && rm -rf zlib-$VERS.tar.gz zlib-$VERS
|