php/Dockerfile

57 lines
2.5 KiB
Docker
Raw Normal View History

2017-12-07 04:19:02 +00:00
# NAME leenooks/php
2021-07-06 06:08:35 +00:00
# VERSION 8.0-fpm-image
2017-12-07 04:19:02 +00:00
2021-07-06 06:08:35 +00:00
FROM registry.leenooks.net/leenooks/php:8.0-fpm-latest
RUN mv /sbin/init /sbin/init.tmp \
&& apt-get update \
&& apt-get install -yqq wkhtmltopdf \
&& apt purge -yqq systemd-sysv dconf-service \
&& apt autoremove -yqq \
&& rm -rf /var/lib/apt/lists/* /tmp/* \
&& mv /sbin/init.tmp /sbin/init
2021-03-03 22:26:34 +00:00
RUN cd /usr/local/bin && curl -OsL https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && chmod +x install-php-extensions
2020-01-22 13:10:38 +00:00
RUN mv /sbin/init /sbin/init.tmp \
&& sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list \
2020-01-01 21:23:08 +00:00
&& cat /etc/apt/sources.list|grep ^deb | sed -E 's/^deb/deb-src/' >> /etc/apt/sources.list \
&& apt-get -y update \
&& apt-get -y install wget build-essential libtool git-core libwmf0.2-7 libreadline8 \
libpangocairo-1.0-0 libxt6 libjbig0 liblcms2-2 libtiff5 liblqr-1-0 libdjvulibre21 libfftw3-double3 libx265-192 \
libwebpmux3 libwebpdemux2 libopenexr25 libilmbase25 libopenjp2-7 \
2021-03-03 22:26:34 +00:00
&& apt-get -y build-dep imagemagick libmagickcore-dev libde265 libheif libfontconfig1 \
2020-01-01 21:23:08 +00:00
&& cd /usr/src/ \
&& git clone https://github.com/strukturag/libde265.git \
&& git clone https://github.com/strukturag/libheif.git \
&& cd libde265/ \
&& ./autogen.sh \
&& ./configure \
&& make \
&& make install \
&& cd /usr/src/libheif/ \
&& ./autogen.sh \
&& ./configure \
&& make \
&& make install \
2021-03-03 22:26:34 +00:00
&& mkdir /usr/src/ImageMagick \
&& git clone https://github.com/ImageMagick/ImageMagick.git ImageMagick-7.0.11 \
&& cd ImageMagick-7.0.11 \
&& ./configure --with-heic=yes --with-modules \
2020-01-01 21:23:08 +00:00
&& make install \
&& ldconfig \
&& apt-get install -y libbz2-dev libgmp-dev libpng-dev libjpeg-dev libfreetype6-dev --no-install-recommends \
2021-07-06 06:08:35 +00:00
&& docker-php-ext-install -j$(nproc) gmp exif \
2021-03-03 22:26:34 +00:00
&& install-php-extensions imagick \
&& apt-get purge -y build-essential libtool wget *-dev \
hicolor-icon-theme texlive-base texlive-binaries automake bsdmainutils doxygen \
fonts-lmodern ghostscript graphviz gsfonts icu-devtools jdupes groff-base chrpath dbus \
man-db python3 xsltproc \
tex-common mime-support poppler-data preview-latex-style libgdk-pixbuf2.0-0 libgl1-mesa-dri libpaper1 libpulse0 \
libqt5core5a libqt5gui5 libsensors-config libvdpau1 shared-mime-info libglib2.0-data libxml2-utils ttf-bitstream-vera libgvc6 \
2021-03-03 22:26:34 +00:00
imagemagick-6-common \
2020-01-01 21:23:08 +00:00
&& apt-get autoremove -y \
2020-04-02 05:55:19 +00:00
&& rm -rf /var/lib/apt/lists/* /tmp/* \
&& rm -rf /usr/src/libde265 /usr/src/libheif /usr/src/ImageMagick \
2020-01-22 13:10:38 +00:00
&& mv /sbin/init.tmp /sbin/init