-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (41 loc) · 1.75 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM ghcr.io/biodiversity-cz/php-fpm-noroot-socket:main@sha256:a659a8dc7a12552227bada668c79b6d569b7b4036d174aa2fc79b1ddab5c2e40
MAINTAINER Petr Novotný <[email protected]>
LABEL org.opencontainers.image.source=https://github.com/biodiversity-cz/jacq-repository-base
LABEL org.opencontainers.image.description="base image for JACQ CZ repository"
USER root
RUN apt-get update && apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends \
wget \
imagemagick \
libgraphicsmagick1-dev \
libmagickwand-dev \
libpq-dev \
zbar-tools && \
apt-get autoclean -y && \
apt-get remove -y wget && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* /var/lib/log/* /tmp/* /var/tmp/*
# https://gist.github.com/Wirone/d5c794b4fef0203146a27687e80588a6
#RUN pecl install imagick-3.7.0
# Imagick is installed from the archive because regular installation fails
# See: https://github.com/Imagick/imagick/issues/643#issuecomment-1834361716
ARG IMAGICK_VERSION=3.7.0
RUN curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/tags/${IMAGICK_VERSION}.tar.gz \
&& tar --strip-components=1 -xf /tmp/imagick.tar.gz \
&& phpize \
&& ./configure \
&& make \
&& make install \
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini \
&& rm -rf /tmp/*
# <<< End of Imagick installation
RUN docker-php-ext-enable imagick && \
docker-php-ext-install pdo && \
docker-php-ext-install intl && \
docker-php-ext-install pdo_pgsql && \
docker-php-ext-install pgsql && \
docker-php-ext-install opcache && \
docker-php-ext-install exif
#increase Imagick limits
COPY ./policy.xml /etc/ImageMagick-6/policy.xml
USER www