title: Update cURL php extension on php:7.0-fpm docker container
body: <p>I'm able to upgrade the cURL binary and libs, however PHP still utilizes the old version.</p>
  
  <p><a href="https://i.stack.imgur.com/XXoDV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XXoDV.png" alt="cURL binary and libs"></a>
  <a href="https://i.stack.imgur.com/DLttS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DLttS.png" alt="PHP cURL"></a></p>
  
  <p>I'm building on top of the official <a href="https://github.com/docker-library/php/blob/3cb02a21164bc2bdb8b25ec48886ffcb7e195510/7.0/fpm/Dockerfile" rel="nofollow noreferrer"><code>php:7.0-fpm</code></a> docker container.</p>
  
  <h2>First, I've upgraded cURL:</h2>
  
  <pre><code>RUN curl -fsSL 'https://curl.haxx.se/download/curl-7.50.3.tar.gz' -o curl.tar.gz \
      &amp;&amp; mkdir -p curl \
      &amp;&amp; tar -xf curl.tar.gz -C curl --strip-components=1 \
      &amp;&amp; rm curl.tar.gz \
      &amp;&amp; ( \
          cd curl \
          &amp;&amp; make \
          &amp;&amp; make install \
          &amp;&amp; ldconfig \
      ) \
      &amp;&amp; rm -r curl 
  </code></pre>
  
  <h2>I've tried:</h2>
  
  <ol>
  <li><p>Use <code>libtool</code></p>
  
  <pre><code>cd curl \
  &amp;&amp; ./buildconf \
  &amp;&amp; ./configure \
  # ...
  </code></pre></li>
  <li><p>Re-install curl for PHP</p>
  
  <pre><code>RUN docker-php-ext-configure curl --with-curl=/usr/local/lib
  RUN docker-php-ext-install curl
  </code></pre></li>
  </ol>
  
  <p>But this throws the error/warning:
  <code>warning: curl (curl.so) is already loaded!</code>
  and eventually just ignores that I want to reinstall it.</p>
  
  <ol start="3">
  <li>Several smaller random stuff</li>
  </ol>
  
  <p>If possible, I'm looking for a solution that doesn't require a complete recompile of PHP.</p>