title: How to use php artisan serve inside docker container?
body: <p>I create a php-composer image using dockerfile:</p>
  
  <pre><code>FROM php:7
  
  RUN apt-get update 
  RUN apt-get install curl
  RUN curl -sS https://getcomposer.org/installer -o composer-setup.php
  RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer
  RUN apt-get install -y git
  </code></pre>
  
  <p>And I run following commands to create a container and start a laravel app.</p>
  
  <pre><code>docker run -p 127.0.0.1:3000:8000 --name MyTest -dt php-composer to create a container
  docker cp laravelApp/ d4bbb5d36312:/usr/
  docker exec -it MyTest bash
  cd usr/laravelApp
  php artisan serve
  </code></pre>
  
  <p>After thet, container's terminal will show the success info:</p>
  
  <pre><code>Laravel development server started: &lt;http://127.0.0.1:8000&gt;
  </code></pre>
  
  <p>But when I access 127.0.0.1:3000 at local browser, I get nothing.</p>
  
  <p>So is it possible that simply run php artisan serve to start a laravel app inside docker container? </p>
  
  <p>Or I must to using nginx or apache to run it?</p>