I'm using this offical php Docker image: <https://github.com/docker-library/php/blob/76a1c5ca161f1ed6aafb2c2d26f83ec17360bc68/7.1/alpine/Dockerfile>

Now I need to add support for yaml extension, that is not bundled with php.
I see the base image I'm using uses phpize.

I'm trying with this approach:

```
FROM php:7.1.5-alpine

# Install and enable yaml extension support to php
RUN apk add --update yaml yaml-dev
RUN pecl channel-update pecl.php.net  
RUN pecl install yaml-2.0.0 && docker-php-ext-enable yaml

```

But I get this errors:

```
running: phpize
Configuring for:
PHP Api Version:         20160303
Zend Module Api No:      20160303
Zend Extension Api No:   320160303
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

ERROR: `phpize' failed
ERROR: Service 'php_env' failed to build: The command '/bin/sh -c pecl  install yaml-2.0.0 && docker-php-ext-enable yaml' returned a non-zero code: 1

```

What is the most idiomatic docker way to use that image and add that support?

Should I use it as base, or is someway possible to add parameters in order to make wanted extension configurable?