message: Handle new gd configure options in php 7.4 image
diff: @@ -57,26 +57,38 @@ RUN apk add --no-cache fcgi \
  libwebp-dev \
  postgresql-dev \
  && apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS \
  - && if [ ${PHP_VERSION%.*} == "7.3" ]; then \
  + && case ${PHP_VERSION} in \
  + 7.3*) \
  yes '' | pecl install -f apcu \
  && yes '' | pecl install -f xdebug-2.7.0 \
  && yes '' | pecl install -f redis-4.3.0; \
  - elif [ ${PHP_VERSION%.*.*} == "7" ]; then \
  + ;; \
  + 7*) \
  yes '' | pecl install -f apcu \
  && yes '' | pecl install -f xdebug \
  && yes '' | pecl install -f redis-4.3.0; \
  - fi \
  - && if [ ${PHP_VERSION%.*.*} == "5" ]; then \
  + ;; \
  + 5*) \
  yes '' | pecl install -f apcu-4.0.11 \
  && yes '' | pecl install -f xdebug-2.5.5 \
  && yes '' | pecl install -f redis-4.3.0; \
  - fi \
  + ;; \
  + esac \
  && docker-php-ext-enable apcu redis xdebug \
  - && docker-php-ext-configure gd --with-webp-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
  + && case ${PHP_VERSION} in \
  + 7.4*) \
  + docker-php-ext-configure gd --with-webp --with-jpeg \
  + ;; \
  + *) \
  + docker-php-ext-configure gd --with-webp-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
  + ;; \
  + esac \
  && docker-php-ext-install -j4 bcmath gd gettext pdo_mysql mysqli pdo_pgsql pgsql shmop soap sockets opcache xsl zip \
  - && if [ ${PHP_VERSION%.*} == "7.1" ] || [ ${PHP_VERSION%.*} == "7.0" ] || [ ${PHP_VERSION%.*.*} == "5" ]; then \
  + && case ${PHP_VERSION} in \
  + 7.1*|7.0*|5*) \
  docker-php-ext-install mcrypt; \
  - fi \
  + ;; \
  + esac \
  && sed -i '1s/^/;Intentionally disabled. Enable via setting env variable XDEBUG_ENABLE to true\n;/' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
  && rm -rf /var/cache/apk/* /tmp/pear/ \
  && apk del .phpize-deps \
  