php with jpeg dir,7.4 -alpine, configure: error: unrecognized options: --with-jpeg-dir, --with-png-...

安装 FROM php:7.4-fpm-alpine gd 库时报错

configure: error: unrecognized options: --with-freetype-dir, --with-jpeg-dir, --with-png-dir

PHP 7.4 已不推荐使用 gd 库,去掉 docker-php-ext-configure gd 编译参数

Dockerfile文件如下

FROM php:7.4.1-apache

RUN apt-get update && apt-get install -y --no-install-recommends \

autoconf \

build-essential \

apt-utils \

zlib1g-dev \

libzip-dev \

unzip \

zip \

libmagick++-dev \

libmagickwand-dev \

libpq-dev \

libfreetype6-dev \

libjpeg62-turbo-dev \

libpng-dev \

libwebp-dev \

libxpm-dev

RUN docker-php-ext-configure gd \

--with-png-dir=/usr/include/ \

--with-jpeg-dir=/usr/include/ \

--with-freetype-dir=/usr/include/

RUN docker-php-ext-configure zip --with-libzip

RUN docker-php-ext-install gd intl pdo_mysql pdo_pgsql mysqli zip

RUN pecl install imagick-3.4.3

RUN pecl install xdebug && docker-php-ext-enable xdebug

RUN docker-php-ext-enable imagick

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

# Clear package lists

RUN apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

# Permissions

RUN chown -R root:www-data /var/www/html

RUN chmod u+rwx,g+rx,o+rx /var/www/html

RUN find /var/www/html -type d -exec chmod u+rwx,g+rx,o+rx {} +

RUN find /var/www/html -type f -exec chmod u+rw,g+rw,o+r {} +

WORKDIR /var/www/html

RUN a2enmod rewrite

RUN a2enmod ssl

EXPOSE 80

EXPOSE 443

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值