title: PHP HTTP extension on Docker alpine image
body: <p>I am trying to install/enable the PHP http extension on my PHP alpine image.</p>
  
  <p>My <code>composer.json</code> file for my application contains <code>"ext-http": "*"</code>, hence my goal.</p>
  
  <p>My Dockerfile (relevant portions) is as follows:</p>
  
  <pre><code># PHP-FPM Base Image
  FROM php:7.2.26-fpm-alpine
  
  # Install PHP extensions
  RUN apk add --update --virtual .build-deps autoconf g++ make zlib-dev curl-dev \
    &amp;&amp; pecl install raphf propro \
    &amp;&amp; docker-php-ext-enable raphf propro \
    &amp;&amp; pecl install pecl_http \
    &amp;&amp; echo -e "extension=raphf.so\nextension=propro.so\nextension=http.so" &gt; /usr/local/etc/php/conf.d/docker-php-ext-http.ini \
    &amp;&amp; rm -rf /usr/local/etc/php/conf.d/docker-php-ext-raphf.ini \
    &amp;&amp; rm -rf /usr/local/etc/php/conf.d/docker-php-ext-propro.ini \
    &amp;&amp; apk del .build-deps \
    &amp;&amp; rm -rf /tmp/*
  </code></pre>
  
  <p>However when running <code>composer update</code>, I get the following warning:</p>
  
  <pre><code>PHP Warning:  PHP Startup: Unable to load dynamic library 'http.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/http.so (Error relocating /usr/local/lib/php/extensions/no-debug-non-zts-20170718/http.so: uidna_IDNToASCII: symbol not found), /usr/local/lib/php/extensions/no-debug-non-zts-20170718/http.so.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20170718/http.so.so: No such file or directory)) in Unknown on line 0
  </code></pre>
  
  <p>After which, the <code>composer update</code> command fails:</p>
  
  <pre><code>The requested PHP extension ext-http * is missing from your system. Install or enable PHP's http extension.
  </code></pre>
  
  <p>The <code>http.so.so</code> part of the warning gives me pause, making me think the file is being looked for in an incorrect location.</p>
  
  <p>My reference is the following Dockerfile: <a href="https://hub.docker.com/r/realpaul/docker-php/dockerfile" rel="nofollow noreferrer">https://hub.docker.com/r/realpaul/docker-php/dockerfile</a></p>
  
  <p>Can someone please help me debug this issue? Thank you!</p>