title: Build docker image that depends on a local "Dockerfile"
body: <p>I have the following folder structure:</p>
  
  <pre><code>my_package
  |- docker_compose.yml
  |- a
     |- Dockerfile
  |- b
     |- Dockerfile
  </code></pre>
  
  <p>Here, my <code>docker-compose.yml</code> is:</p>
  
  <pre><code>version: '2'
  services:
    a:
      build: 
        context: a
        dockerfile: Dockerfile
    b:
      build: 
        context: b 
        dockerfile: Dockerfile
  </code></pre>
  
  <p>When I run <code>docker-compose build</code> I expect two output images, one for <code>a</code> and one for <code>b</code>.</p>
  
  <p>Here's <code>a/Dockerfile</code></p>
  
  <pre><code>FROM ubuntu
  RUN touch AAA
  </code></pre>
  
  <p>Here's <code>b/Dockerfile</code></p>
  
  <pre><code>FROM &lt;a&gt; # NOT SURE WHAT TO PUT HERE
  RUN touch BBB
  </code></pre>
  
  <p>I would like the <code>b</code> image to contain two files in the rootdir, <code>AAA</code> and <code>BBB</code>, which requires one Dockerfile to depend on another.</p>
  
  <p>Is this possible? Is there any workaround to make two Docker images (with a dependency between them) build in one <code>docker-compose build</code> command?</p>
  
  <p>I'm stuck with <code>Docker version 1.12.6, build 78d1802</code> (which is compatible with version 2 syntax only).</p>