title: add yaml extension to php on using official Alpine Docker image
body: <p>I'm using this offical php Docker image: <a href="https://github.com/docker-library/php/blob/76a1c5ca161f1ed6aafb2c2d26f83ec17360bc68/7.1/alpine/Dockerfile" rel="nofollow noreferrer">https://github.com/docker-library/php/blob/76a1c5ca161f1ed6aafb2c2d26f83ec17360bc68/7.1/alpine/Dockerfile</a></p>
  
  <p>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.</p>
  
  <p>I'm trying with this approach:</p>
  
  <pre><code>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 &amp;&amp; docker-php-ext-enable yaml
  </code></pre>
  
  <p>But I get this errors:</p>
  
  <pre><code>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 &amp;&amp; docker-php-ext-enable yaml' returned a non-zero code: 1
  </code></pre>
  
  <p>What is the most idiomatic docker way to use that image and add that support?</p>
  
  <p>Should I use it as base, or is someway possible to add parameters in order to make wanted extension configurable?</p>