title: Docker - install php-memcached extension not working?
body: <p>I have been trying to install memcached in my php-5.6 container, however I am unable to get it working, as i don't see memcached extension in phpinfo() and plus for some reason it's complaining about that it can't find the memcache.so in the code.</p>
  
  <p>there is my docker-file for php build</p>
  
  <pre><code>FROM php:5.6-fpm
  RUN apt-get update &amp;&amp; apt-get install -y \
          libfreetype6-dev \
          libjpeg62-turbo-dev \
          libmcrypt-dev \
          libpng12-dev \
      &amp;&amp; docker-php-ext-install -j$(nproc) iconv mcrypt \
      &amp;&amp; docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
      &amp;&amp; docker-php-ext-install -j$(nproc) gd     
  
  RUN docker-php-ext-install mysqli mbstring pdo_mysql 
  
  # Download and Installing php libraries 
  RUN apt-get install -y memcached
  RUN apt-get -y install php-pear php5-dev php5-memcached geoip-bin geoip-database libgeoip-dev php5-geoip
  
  # Download and Installing php libraries 
  RUN pecl install geoip
  
  # Download and Installing git and vim 
  RUN apt-get -y install git gcc  
  
  RUN pwd
  RUN git clone --depth=1 git://github.com/phalcon/cphalcon.git 
  WORKDIR /var/www/html/cphalcon/build
  RUN ./install
  
  EXPOSE 9000
  EXPOSE 11211
  
  COPY ./php-fpm.d/www.conf /etc/php-fpm.d/www.conf
  COPY ./php.ini  /usr/local/etc/php/php.ini 
  COPY ./php-fpm.conf /etc/php-fpm.conf
  COPY ./phalcon.ini /usr/local/etc/php/conf.d/phalcon.ini
  COPY ./geoip.ini /usr/local/etc/php/conf.d/geoip.ini
  COPY ./memcached.ini /usr/local/etc/php/conf.d/memcached.ini
  </code></pre>
  
  <p>And my docker compose file is </p>
  
  <pre><code>nginx:
      build: ./.config/etc/nginx/
      ports:
          - 7000:80
      links:
          - php
          - memcached:memcached            
      volumes_from:
          - app
  
  memcached:
    image: memcached:latest   
  
  php:
      build: ./.config/etc/php/
      expose:
          - 9000
      links:
          - mysql
          - memcached:memcached            
      volumes_from:
          - app
  
  app:
      image: php:5.6-fpm
      #image: php:7.0-fpm
      volumes:
          - ./:/var/www/vhosts/example.com/httpdocs
      command: "true"
  </code></pre>
  
  <p>The error i am getting on the code is</p>
  
  <p><strong>[36;1mnginx_1      | [0mPHP message: PHP Fatal error:  Class 'memcache' not found in Unknown on line 0" while reading response header from upstream, client: 192.168.99.1, server: www.example.dev, request: "GET /search HTTP/1.1", upstream: "fastcgi://172.17.0.5:9000", host: "192.168.99.100:7000"</strong></p>
  
  <p>What is going wrong here?</p>