blob: cc93065f79dc98f2a90bc2c2b5f67d6d37f67bd3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
FROM alpine as base
ARG PREFIX=/usr/local
ARG DESTDIR=/opt/spm/libpng-1.6.50
RUN apk update && apk add \
make \
gcc \
pkgconf \
musl-dev \
wget
RUN wget -O libpng-1.6.50.tar.gz https://sourceforge.net/projects/libpng/files/libpng16/1.6.50/libpng-1.6.50.tar.gz/download
RUN tar -xf libpng-1.6.50.tar.gz
WORKDIR /build-libpng
COPY --from=zlib:1.3.1 /opt/spm/zlib-1.3.1 /usr/local/
RUN CFLAGS='-ffunction-sections -fdata-sections -Os' \
../libpng-1.6.50/configure \
--enable-shared=no
RUN make -j$(nproc)
RUN make install DESTDIR=$DESTDIR
FROM scratch
COPY --from=base /opt/spm/libpng-1.6.50/usr/local/ /opt/spm/libpng-1.6.50/
|