title: Docker with php built-in server
body: <p>I'm trying to run php built-in server (<code>php -S localhost:8080</code>) via docker, I cannot access site from the host though - I always end up with Connection reset.</p>
  
  <p>Here's a simple Dockerfile I build on:</p>
  
  <pre><code>FROM centos:centos6
  
  RUN rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
  RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
  RUN rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
  
  RUN yum --enablerepo=remi,remi-php55 install -y php php-opcache php-cli php-pear php-common &amp;&amp; yum clean all
  RUN php -r "readfile('https://getcomposer.org/installer');" | php
  RUN echo "date.timezone = Europe/Prague" &gt;&gt; /etc/php.ini
  RUN mv composer.phar /usr/bin/composer
  RUN php -r "eval('?&gt;'.file_get_contents('http://backend.bolt80.com/piecrust/install'));"
  RUN mv piecrust.phar /usr/bin/chef
  
  CMD ["/bin/bash"]
  </code></pre>
  
  <p>Is it even possible to run this server with docker? While trying to make it work, I found out that when nginx was installed and set to listen on this very port, it is accessible from the host. PHP built-in server seems to be hidden from the host, thus not able to serve any requests though.</p>
  
  <p>Anyone was successful making this work?</p>