title: Docker install memcached
body: <p>I am trying to install memcached in Dockerfile but I keep getting th same error. Everything was working fine but looks like some layers were cached I and the images was being built with no problems at all. But since I cleared the cache I can't build the image. Here is some of it's content:</p>
  
  <pre><code>FROM php:5-apache
  
  RUN apt-get install -y libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev
  RUN pecl install memcached
  RUN echo extension=memcached.so &gt;&gt; /usr/local/etc/php/conf.d/memcached.ini
  </code></pre>
  
  <p>There are many other things that are installed but as I said everything was working before. The error is that memcached requires php7 to run. I dont know if something has changed in the recent builds of the library but looks like it refuses to work with php5. Here is the error:</p>
  
  <pre><code>pecl/memcached requires PHP (version &gt;= 7.0.0), installed version is 5.6.30
  pecl/memcached can optionally use PHP extension "igbinary" (version &gt;= 2.0)
  pecl/memcached can optionally use PHP extension "msgpack" (version &gt;= 2.0)
  No valid packages found
  install failed
  The command '/bin/sh -c pecl install memcached' returned a non-zero code: 1
  </code></pre>