FROM alpine:latest as builder
ARG tag=v3.3.1
RUN apk --update --no-cache add
build-base
autoconf
automake
libtool
pkgconf
nasm
tar
zlib-dev libjpeg-turbo-dev libpng libpng-dev zlib-dev
nasm
WORKDIR /src/mozjpeg
ADD https://github.com/mozilla/mozjpeg/archive/$tag.tar.gz ./
RUN tar -xzf $tag.tar.gz RUN rm $tag.tar.gz
RUN SRC_DIR=$(ls -t1 -d mozjpeg-* | head -n1) &&
cd $SRC_DIR &&
autoreconf -fiv &&
cd .. &&
sh $SRC_DIR/configure &&
make install
prefix=/usr/local
libdir=/usr/local/lib64
FROM php:7.4-alpine
COPY --from=builder /usr/local /usr/local
RUN apk add --no-cache
curl bash coreutils rsync git
nodejs nodejs-npm
tar make gcc g++ python3
automake autoconf libtool pkgconfig
libpng libpng-dev
libjpeg-turbo-dev libwebp-dev zlib-dev libxpm-dev
nasm
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
CMD ["bash"]
Content type
Image
Digest
Size
146.9 MB
Last updated
about 6 years ago
docker pull havaslynx/php-node-mozjpeg:dev