title: Linode/lamp + docker-compose
body: <p>I want to install <a href="https://hub.docker.com/r/linode/lamp/" rel="nofollow">linode/lamp</a> container to work on some wordpress project locally without messing up my machine with all the lamp dependencies.</p>
  
  <p>I followed <a href="https://www.linode.com/docs/applications/containers/how-to-install-docker-and-deploy-a-lamp-stack" rel="nofollow">this tutorial</a> which worked great (it's actually super simple).</p>
  
  <p>Now I'd like to use <code>docker-compose</code> because I find it more convenient to simply having to type <code>docker-compose up</code> and being good to go.</p>
  
  <p>Here what I have done:</p>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM linode/lamp
  RUN service apache2 start
  RUN service mysql start
  </code></pre>
  
  <p>docker-compose.yml:</p>
  
  <pre><code>web:
    build: .
    ports:
      - "80:80"
    volumes:
      - .:/var/www/example.com/public_html/
  </code></pre>
  
  <p>When I do <code>docker-compose up</code>, I get:</p>
  
  <pre><code>▶ docker-compose up
  Recreating gitewordpress_web_1...
  Attaching to gitewordpress_web_1
  gitewordpress_web_1 exited with code 0
  Gracefully stopping... (press Ctrl+C again to force)
  </code></pre>
  
  <p>I'm guessing I need a command argument in my <code>docker-compose.yml</code> but I have no idea what I should set.</p>
  
  <p>Any idea what I am doing wrong?</p>