docker php-fpm容器中添加GD扩展

apt update #更新软件源

apt install -y libwebp-dev libjpeg-dev libpng-dev libfreetype6-dev #安装各种库

docker-php-source extract #解压源码

cd /usr/src/php/ext/gd #gd源码文件夹

docker-php-ext-configure gd --with-webp-dir=/usr/include/webp --with-jpeg-dir=/usr/include --with-png-dir=/usr/include --with-freetype-dir=/usr/include/freetype2 #准备编译

docker-php-ext-install gd #编译安装

php -m | grep gd

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容