Trying to build from the official `php:7.1-fpm-alpine` image, using the following excerpt in my Dockerfile:

```
FROM php:7.1-fpm-alpine

RUN set -ex \
    apk add --no-cache --virtual .build-deps \
    freetype-dev \
    libjpeg-turbo-dev \
    libpng-dev \
\
    && docker-php-ext-configure gd \
        --with-freetype-dir=/usr \
        --with-png-dir=/usr \
        --with-jpeg-dir=/usr \
    && docker-php-ext-install gd \
    && apk del .build-deps

```

When attempting to build this with `docker build`, GD fails during `./configure` with the following error:

```
configure: error: jpeglib.h not found

```

I can confirm that `jpeglib.h` exists and is exactly where *I think it should be* (indeed, exactly where it is in Debian variants):

```
$ docker run -it --rm php:7.1-fpm-alpine /bin/sh
>$ apk add --no-cache libjpeg-turbo-dev \
   && find /usr -type f -name 'jpeglib.h'
   ...
   /usr/include/jpeglib.h

```

But if I take *exactly* the same command used in the dockerfile and run it interactively inside the container, it builds flawlessly. No errors.

Is this a bug, or am I missing something?