anchor.diff:      make \
       git \
       pkgconf \
  -    re2c
  +    re2c \
  +    libxml2-dev
   
  +# persistent dependencies
   # inspired by https://github.com/prooph/docker-files/blob/master/php/7.1-fpm
  -RUN set -xe \
  -    && apk add --no-cache --virtual .persistent-deps \
  +RUN set -ex \
  +       &&  apk add --no-cache \
           bash \
  -        icu-dev \
  -        libxml2-dev \
  +        mysql-client \
  +        gzip \
  +        icu \
           libzip-dev \
  -        mysql-client \
  -        gzip
  +        freetype-dev \
  +        libjpeg-turbo-dev \
  +        libpng-dev \
  +        icu-dev
   
  -RUN set -xe \
  +RUN set -ex \
       && apk add --no-cache --virtual .build-deps \
           $PHPIZE_DEPS \
       && docker-php-ext-configure bcmath --enable-bcmath \
  -    && docker-php-ext-configure intl --enable-intl \
  +    && docker-php-ext-configure gd \
  +        --with-gd \
  +        --with-freetype-dir=/usr/include \
  +        --with-png-dir=/usr/include \
  +        --with-jpeg-dir=/usr/include \
  +    && docker-php-ext-configure intl --enable-intl  \
       && docker-php-ext-configure pcntl --enable-pcntl \
       && docker-php-ext-configure pdo_mysql --with-pdo-mysql \
       && docker-php-ext-configure mbstring --enable-mbstring \
  
positive.code: 
  FROM php:$PHP_VERSION-fpm-alpine
  
  # persistent / runtime deps
  ENV PHPIZE_DEPS \
      autoconf \
      cmake \
  
negative.code:     && docker-php-ext-configure zip --enable-zip --with-libzip \
      && docker-php-ext-install \
          bcmath \
          gd \
          intl \
          pcntl \
          pdo_mysql \
  