title: Building multiple images from a monorepo where each service has its own Dockerfile
body: <p>I'm attempting to learn Azure DevOps Pipelines and AKS. The ultimate goal would to <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/kubernetes/aks-template?view=azure-devops" rel="nofollow noreferrer">Build and deploy to Azure Kubernetes Service</a>, but I'm breaking this into smaller parts so understand what is going on at each stage.</p>
  
  <p>Thus, my current goal is to <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/containers/acr-template?view=azure-devops" rel="nofollow noreferrer">Build and push to Azure Container Registry</a>. </p>
  
  <p>I'm working with a pretty basic monorepo which has this simplified structure:</p>
  
  <pre><code>acr-test/
    client/
      Dockerfile
    db/
      Dockerfile
    server/
      Dockerfile
  </code></pre>
  
  <p>I'd like to generate an image for each part of the application so that a <code>arc-test-client</code> and <code>arc-test-server</code> is generated. </p>
  
  <p>What is currently happening when I "Create Pipeline" in Azure DevOps and let it build the <code>azure-pipelines.yml</code> is it just finds the first <code>Dockerfile</code> and bases all the parameters on it, ignoring the other ones.</p>
  
  <p>Some I'm curious: </p>
  
  <ul>
  <li>Is it possible to create multiple images from a single <code>azure-pipelines.yml</code>?</li>
  <li>Do I need multiple <code>.yml</code> for each <code>Dockerfile</code>?</li>
  <li>Do I need to write a separate <code>.sh</code> to build and push these separately (<a href="https://github.com/StephenGrider/DockerCasts/blob/master/complex/deploy.sh" rel="nofollow noreferrer">example</a>)?</li>
  <li>Or is this simply not possible with a mono-repo?</li>
  </ul>