Troubles with Docker + PHP7 + GD resulting in “Call to undefined function imagecreatefromjpeg()”

耗尽温柔 提交于 2019-12-02 23:47:08
Jin

For PHP 5.6

FROM php:5.6-apache

RUN apt-get update && apt-get install -y \ 
libfreetype6-dev libjpeg62-turbo-dev \ 
libgd-dev libpng12-dev
RUN docker-php-ext-configure gd \ 
--with-freetype-dir=/usr/include/ \ 
--with-jpeg-dir=/usr/include/
RUN docker-php-ext-install gd

If still not working, can re-install the container.

docker rm <container id> 
docker-compose build --pull
docker-compose up
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!