I solve the same issue on my docker php:7-fpm enviroment, and I post the solution here:

If using Dockerfile to setup the enviroment

  1. FROM php:fpm
  2. RUN apt-get update && apt-get install -y \
  3. libfreetype6-dev \
  4. libmcrypt-dev \
  5. libpng12-dev \
  6. libjpeg-dev \
  7. libpng-dev \
  8. vim \
  9. && docker-php-ext-install iconv mcrypt \
  10. && docker-php-ext-configure gd \
  11. --enable-gd-native-ttf \
  12. --with-freetype-dir=/usr/include/freetype2 \
  13. --with-png-dir=/usr/include \
  14. --with-jpeg-dir=/usr/include \
  15. && docker-php-ext-install gd \
  16. && docker-php-ext-install mbstring \
  17. && docker-php-ext-enable opcache gd

分类: web

标签:   docker   php