title: Can docker compose build image from different Dockerfiles at the same folder
body: <p>My containers should share the same source code folder.</p>
  
  <p>But they should build from different Dockerfiles.</p>
  
  <p>Is it possible to build them with docker-compose and build from different Dockerfiles at a time?</p>
  
  <p>I wish there is a syntax like </p>
  
  <blockquote>
    <p><code>build: . -f &lt;&lt;Dockerfile_ABC&gt;</code> <code>build: . -f &lt;&lt;Dockerfile_CDE&gt;</code></p>
  </blockquote>
  
  <pre><code>abc:
    build: . -f &lt;&lt;Dockerfile_ABC&gt;
    environment:
      - PROJECT=abc
    command: ruby abc/abc.rb
    volumes:
        - ./:/working_direcotry
    ports:
      - 5904:5904
  
  cde:
    build: . -f &lt;Dockerfile_CDE&gt;
    environment:
      - PROJECT=cde
    command: ruby cde/cde.rb
    volumes:
        - ./:/working_direcotry
    ports:
      - 5902:5902
  </code></pre>