title: Unable to build docker compose with Azure Function project in Visual Studio 2019
body: <p>I'm trying to add an Azure Function project to a docker-compose file created in Visual Studio 2019 (16.7.6), but this causes the solution to fail to build.</p>
  <p>(Docker for Windows 2.4.0.0 (48506), with WSL2 support enabled, running in Linux container mode on Windows 10 Pro 2004)</p>
  <p>Steps to reproduce:</p>
  <ol>
  <li>Create a new solution with a Web Api project 'Web' that includes docker
  support.</li>
  <li>Add a new Azure Function project 'Func' with an Http trigger
  function and then added docker support via Visual Studio Add &gt;
  Docker Support option.</li>
  <li>Add 'Container Orchestration Support' to Web
  project to generate a docker-compose.yml file that has the web app</li>
  </ol>
  <p>At this point the solution builds debugging works for the web or func app in docker or docker-compose - all good.</p>
  <p>When 'Func' project is added manually to docker-compose.yml the solution no longer builds:</p>
  <pre><code>CTC1031 Linux containers are not supported for Func project
  Project: docker-compose
  File: Microsoft.VisualStudio.Docker.Compose.targets
  Line 303
  </code></pre>
  <p>However, I can run docker-compose fine from the command line:</p>
  <pre><code>docker-compose -f docker-compose.yml up
  </code></pre>
  <p>and both Web and Func app start up fine.</p>
  <p>My docker-compose.yml file is</p>
  <pre><code>version: '3.4'
  
  services:
    web:
      image: ${DOCKER_REGISTRY-}web
      build:
        context: .
        dockerfile: Web/Dockerfile
  
    func:
      image: ${DOCKER_REGISTRY-}func
      build:
        context: .
        dockerfile: Func/Dockerfile
  </code></pre>
  <p>Any ideas why I get the above error when building the solution in Visual Studio?</p>