paboo's avatar
Level 1

Call to undefined function Intervention\Image\Gd\imagecreatefromjpeg()

in my docker file .yml

ARG PHP_VERSION

FROM php:${PHP_VERSION}-fpm

MAINTAINER ông bành tổ Đỗ Xuân Anh "[email protected]"
RUN apt-get update && \
    apt-get install -y \
    libfreetype6-dev \
    libwebp-dev \
    libjpeg62-turbo-dev \
    libpng-dev \
    nano \
    libgmp-dev \
    libldap2-dev \
    netcat \
    sqlite3 \
    libsqlite3-dev && \
    docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-webp-dir=/usr/include/  --with-jpeg-dir=/usr/include/ && \
    docker-php-ext-install gd pdo pdo_mysql pdo_sqlite zip gmp bcmath pcntl ldap sysvmsg exif \
&& a2enmod rewrite
RUN docker-php-ext-install exif
RUN echo "=====INSTALL COMPOSER====="
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
#RUN php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
RUN php composer-setup.php
RUN php -r "unlink('composer-setup.php');"
RUN mv composer.phar /usr/local/bin/composer
RUN echo "=====INSTALL COMPOSER COMPLETED====="
RUN composer require "ext-gd:*" --ignore-platform-reqs
RUN composer install

what heppend with my docker file

thanks for help bros
0 likes
3 replies
Sinnbeck's avatar

Did you get it solved or do you need help?

Please or to participate in this conversation.