Проект использует изображение docker php: 7.1-fpm для запуска моего приложения laravel.При установке laravel / cashier через prooph / composer: 7.2 выдает ошибку:
Problem 1
- laravel/cashier v7.1.0 requires dompdf/dompdf ^0.8.0 -> satisfiable by dompdf/dompdf[v0.8.0, v0.8.1, v0.8.2].
- laravel/cashier v7.1.1 requires dompdf/dompdf ^0.8.0 -> satisfiable by dompdf/dompdf[v0.8.0, v0.8.1, v0.8.2].
- dompdf/dompdf v0.8.2 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- dompdf/dompdf v0.8.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- dompdf/dompdf v0.8.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- Installation request for laravel/cashier ^7.1 -> satisfiable by laravel/cashier[v7.1.0, v7.1.1].
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/etc/php/php.ini
- /usr/local/etc/php/conf.d/amqp.ini
- /usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini
- /usr/local/etc/php/conf.d/docker-php-ext-intl.ini
- /usr/local/etc/php/conf.d/docker-php-ext-pcntl.ini
- /usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini
- /usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini
- /usr/local/etc/php/conf.d/docker-php-ext-soap.ini
- /usr/local/etc/php/conf.d/docker-php-ext-zip.ini
- /usr/local/etc/php/conf.d/mongodb.ini
- /usr/local/etc/php/conf.d/php7.ini
- /usr/local/etc/php/conf.d/redis.ini
- /usr/local/etc/php/conf.d/zmq.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
Вот мой контент dockerfile:
FROM php:7.1-fpm
RUN echo "deb http://www.deb-multimedia.org jessie main" >> /etc/apt/sources.list &&\
curl -L http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb -o /deb-multimedia-keyring.deb &&\
dpkg -i /deb-multimedia-keyring.deb
RUN apt-get update && apt-get install -y \
libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng-dev cron libcurl3 imagemagick libav-tools python
RUN docker-php-ext-configure mcrypt && \
docker-php-ext-install -j$(nproc) iconv mcrypt pdo_mysql opcache && \
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
docker-php-ext-install -j$(nproc) gd
RUN echo "* * * * * root php /var/www/tidytide/artisan schedule:run &> /var/log/cron.artisan" >> /etc/crontab
WORKDIR /var/www/tidytide
COPY --chown=www-data:www-data . .
COPY ./entrypoint.sh /
ENTRYPOINT /entrypoint.sh
Проблема в том, что кассиру требуется пакет dompdf, для которого на php включена библиотека gd.Библиотека GD устанавливается через dockerfile, и, как я вижу, dompdf этого не замечает.