php7.4以后gd的配置改变了, 注意除了删除了dir外,还不能使用--with-png
Old
RUN docker-php-ext-configure gd
--with-png-dir=/usr/include/
--with-jpeg-dir=/usr/include/
--with-freetype-dir=/usr/include/
New
RUN docker-php-ext-configure gd
--with-jpeg=/usr/include/
--with-freetype=/usr/include/