title: Docker compose - multiple dockerfile
body: <p>So I'm new to Docker and I'm following the instructions listed out in <a href="https://blog.wodby.com/6-reasons-to-deploy-drupal-8-with-docker-how-to-guide-b2f073e61672" rel="nofollow noreferrer">this cute article</a>. Essentially this flow involves a <code>pull</code> of default images for Drupal and mariadb, with the Drupal image being inherited from the official PHP image. </p>
  
  <p>Now I'm looking at <code>docker-compose</code> to tie everything together. </p>
  
  <p>1) From my understanding, we need to specify a Dockerfile for each container, but is there a way to have <code>docker-compose</code> use the Dockerfile that's bundled with the image itself, without having to explicitly create a Dockerfile? </p>
  
  <p>In the example from the link, issuing <code>pull</code>s of the images for mariadb and Drupal end up using the Dockerfiles corresponding to those images itself. </p>
  
  <p>2) In the example from the link, the containers are started by issuing <code>docker run</code> commands as such:</p>
  
  <pre><code>$ docker run -e MYSQL_ROOT_PASSWORD=admin -e MYSQL_DATABASE=drupal8 -e MYSQL_USER=drupal8 -e MYSQL_PASSWORD=drupal8 -v mariadb:/var/lib/mysql -d --name mariadb mariadb
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$ docker run --name drupal8 --link mariadb:mysql -p 80:80 -d drupal:8.0.1
  </code></pre>
  
  <p>Is there a way to add these run commands to the <code>docker-compose</code> flow, the end goal being to be able to just issue <code>docker-compose up -d</code> </p>
  
  <p>Apologies for the naive questions but I'm a bit overwhelmed at this point.</p>