summaryrefslogtreecommitdiff
path: root/zlib/1.3.1/Dockerfile
blob: ee17e534a53d9a1728e3004520d089a46d9bb5bb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM alpine as base
ARG PREFIX=/usr/local
ARG DESTDIR=/opt/spm/zlib-1.3.1
RUN apk update && apk add \
	make \
	gcc \
	musl-dev \
	wget
RUN wget https://zlib.net/zlib-1.3.1.tar.gz
RUN tar -xf zlib-1.3.1.tar.gz
WORKDIR /build-zlib
RUN CFLAGS='-ffunction-sections -fdata-sections -Os' \
    ../zlib-1.3.1/configure \
    --prefix=$PREFIX \
    --static
RUN make -j$(nproc)
RUN make install DESTDIR=$DESTDIR
FROM scratch
COPY --from=base /opt/spm/zlib-1.3.1/usr/local /opt/spm/zlib-1.3.1