title: memcached not working in docker-compose
body: <p>I have problem with memcached in docker-compose. This is docker-compose.yml: </p>
  
  <pre><code>nginx:
      container_name: nginx
      image: nginx:latest
      ports:
          - 127.0.0.2:8000:80
      volumes:
          - ./htdocs:/htdocs
          - ./nginx.conf:/etc/nginx/conf.d/nginx.conf
      links:
          - php
  php:
      container_name: php
      build: ./php
      volumes:
          - ./htdocs:/htdocs
          - ./php/php.ini:/usr/local/etc/php/php.ini  
      links:
          - mysql
          - memcached
  mysql:
      container_name: mysql
      image: mysql:latest
      ports:
          - 127.0.0.2:8001:3306
      volumes:
          - ./my.cnf:/etc/mysql/my.cnf
          - ./db:/var/lib/mysql
      environment:
          - MYSQL_ROOT_PASSWORD=root
          - MYSQL_DATABASE=db
          - MYSQL_USER=root
          - MYSQL_PASSWORD=root
  memcached:
      container_name: memcached
      image: memcached:latest
      ports:
          - "11211:11211"
  </code></pre>
  
  <p>and this is my php code: </p>
  
  <pre><code>error_reporting(E_ALL &amp; ~E_NOTICE);
  
  $memcached = new Memcached; 
  
  $memcached-&gt;addServer('0.0.0.0', 11211);
  
  echo '&lt;pre&gt;'; print_r($memcached-&gt;getServerList()); echo '&lt;/pre&gt;';
  
  if($memcached-&gt;getStats() === false) {
      echo 'returned false';
  } else {
      echo '&lt;pre&gt;'; print_r($memcached-&gt;getStats()); echo '&lt;/pre&gt;';
  }
  </code></pre>
  
  <p>and result is:</p>
  
  <pre><code>Array
  (
       [0] =&gt; Array
          (
              [host] =&gt; 0.0.0.0
              [port] =&gt; 11211
              [type] =&gt; TCP
          )
  )
  
  returned false
  </code></pre>
  
  <p>Why memcached cant see server? (getStats returned nothing) Command "docker ps" return list where it`s running docker memcached:lastest as port "0.0.0.0:11211->11211/tcp". Sorry  for my english. </p>