title: Running docker-compose with mysql and own docker container
body: <p>I am trying to start my own container and link it with the official mysql container. I am using docker-compose to start both containers and link them together. My own container is supposed to be a regular LAMP-stack which runs a simple PHP application.</p>
  
  <p>When I run <code>docker-compose up</code>, they both build properly, but when docker tries to run them, they just stop with the error code <code>mytestservice_web_1 exited with code 0</code>. I can not see any errors in the build log.</p>
  
  <p>Here is my docker-compose.yml</p>
  
  <pre><code>web:
    build: .
    links:
      - mysql
    ports:
      - "80:80"
  
  mysql:
    image: mysql:5.6
    environment:
       - MYSQL_ROOT_PASSWORD=verysecret
  </code></pre>
  
  <p>Here is my Dockerfile for my own container.</p>
  
  <pre><code>FROM linode/lamp
  WORKDIR /var/www
  RUN a2enmod rewrite
  ADD . /var/www/mytestservice
  ADD mytestservice.conf /etc/apache2/sites-enabled/
  CMD service apache2 start
  </code></pre>
  
  <p>If I start them manually with docker run there are no problems.</p>
  
  <p>How can I keep the containers running?</p>