title: Docker-Compose with multiple services
body: <p>THIS IS A SAMPLE QUESTION! NEVER DO IT IN PRODUCTION. RUN NGINX / PHP / OTHER SERVICES IN SEPARATE CONTAINERS!</p>
  
  <p>When I start <code>docker-compose up</code> the Ubuntu container exits with <code>ubuntu exited with code 0</code>.</p>
  
  <p>When I run <code>docker run -d -ti -p 80:80 -v ~/sph/laravel52:/www/laravel ubuntu</code>, all works fine. </p>
  
  <p>How can I replicate this behavior using Docker Compose?</p>
  
  <p>This is my <code>Dockerfile</code>:</p>
  
  <pre><code># Version: 0.0.1
  FROM ubuntu:15.04
  
  
  
  ENV DEBIAN_FRONTEND noninteractive
  
  #INSTALL ALL
  RUN apt-get update &amp;&amp; apt-get install -y  \
         nano \
         php5-fpm \
         php5-mysql \
         nginx
  
  
  
  #NGINX CONF
  ADD nginx/sites-available/laravel.conf /etc/nginx/sites-available/
  RUN rm /etc/nginx/sites-available/default
  RUN mv /etc/nginx/sites-available/laravel.conf /etc/nginx/sites-available/default
  
  VOLUME /www
  
  
  ENTRYPOINT nginx &amp;&amp; service php5-fpm start &amp;&amp; /bin/bash
  
  CMD ["true"]
  
  
  EXPOSE 80
  </code></pre>
  
  <p>And <code>docker-compose.yml</code>:</p>
  
  <pre><code>version: '2'
  services:
    ubuntu:
          build: .
          container_name: ubuntu
          volumes:
              - ~/sph/laravel52:/www/laravel
          ports:
            - "80:80"
  </code></pre>