gd_info() returns 'JPEG Support' => false
I need to enable JPEG Support on GD, so far I have:
` FROM devilbox/php-fpm-8.0:latest
RUN apt-get update
RUN apt-get install -y
git
zip
curl
sudo
nano
unzip
libzip-dev
libicu-dev
libbz2-dev
libpng-dev
libjpeg-dev
libmcrypt-dev
libreadline-dev
libfreetype6-dev
libcurl4-openssl-dev
pkg-config
libssl-dev
g++
RUN mkdir -p /usr/src/php/ext/mongodb &&
curl -fsSL https://pecl.php.net/get/mongodb | tar xvz -C "/usr/src/php/ext/mongodb" --strip 1 &&
#apt-get update && apt-get install -y libzip-dev libicu-dev libpng-dev libcurl4-openssl-dev pkg-config libssl-dev &&
docker-php-ext-install mongodb pdo_mysql zip gd bcmath sockets
RUN echo 'memory_limit = 4096M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini &&
echo 'max_input_vars = 2000' >> /usr/local/etc/php/conf.d/docker-php-max-input-vars.ini
RUN curl -sS https://getcomposer.org/installer | php --
--install-dir=/usr/bin --filename=composer && chmod +x /usr/bin/composer
RUN docker-php-ext-configure intl &&
docker-php-ext-install intl &&
pecl install xdebug &&
docker-php-ext-enable xdebug
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
&& docker-php-ext-install gd
`
And the gd_info() returns:
[ 'GD Version' => 'bundled (2.1.0 compatible)' 'FreeType Support' => false 'GIF Read Support' => true 'GIF Create Support' => true 'JPEG Support' => false 'PNG Support' => true 'WBMP Support' => true 'XPM Support' => false 'XBM Support' => true 'WebP Support' => false 'BMP Support' => true 'TGA Read Support' => true 'JIS-mapped Japanese Font Support' => false ]
I'm not sure of what's going on.
@elkpodemiami You should not re-install gd. The image already comes with gd compiled by default:
Start a shell on the image
docker run -it --rm --entrypoint=bash devilbox/php-fpm:8.0-work
Show gd information from inside the image
php -r 'print_r(gd_info());'
Array
(
[GD Version] => bundled (2.1.0 compatible)
[FreeType Support] => 1
[FreeType Linkage] => with freetype
[GIF Read Support] => 1
[GIF Create Support] => 1
[JPEG Support] => 1
[PNG Support] => 1
[WBMP Support] => 1
[XPM Support] => 1
[XBM Support] => 1
[WebP Support] => 1
[BMP Support] => 1
[TGA Read Support] => 1
[JIS-mapped Japanese Font Support] =>
)