title: Intended use of appProject in vscode docker-build task
body: <p>Some context: I'm learning to use docker. I have a manually written <code>Dockerfile</code> and a <code>docker-compose.yml</code> file but when I stand up the container and the netcoreapp3.1 Kestrel web app contained therein, there's a problem loading the SSL certificate. The cert file isn't visible to Kestrel for reasons yet unknown to me.</p>
  <p>In the process of fathoming this, I discovered VS Code has support for <code>docker-build</code> tasks. I've excerpted the interesting portion of <a href="https://code.visualstudio.com/docs/containers/reference#_netcore-object-properties-dockerrun-task" rel="nofollow noreferrer">the docs</a> below.</p>
  <p>The part that confuses me is the mandatory <code>appProject</code> property. My <code>Dockerfile</code> pulls source from git; several related projects. Then it compiles it and does various other things. Why do I need to specify an app project in the task when that sort of thing is defined by the <code>Dockerfile</code>? I strongly suspect I have failed to understand how these tasks are intended to be used — something the docs don't really address.</p>
  <p>Could someone please explain the intended mode of use and the relevance of these settings? Preferably with examples.</p>
  <blockquote>
  <h3>Docker build task</h3>
  <p>The <code>docker-build task</code> builds Docker images using the Docker command line (CLI). The task can be used by itself, or as part of a chain of tasks to run and/or debug an application within a Docker container.</p>
  <p>The most important configuration settings for the <code>docker-build</code> task are <code>dockerBuild</code> and <code>platform</code>:</p>
  <ul>
  <li>The <code>dockerBuild</code> object specifies parameters for the Docker build command. Values specified by this object are applied directly to Docker build CLI invocation.</li>
  <li>The <code>platform</code> property is a hint that changes how the <code>docker-build</code> task determines Docker build defaults.</li>
  </ul>
  <h3>Platform support#</h3>
  <p>While the <code>docker-build</code> task in <code>tasks.json</code> can be used to build any Docker image, the extension has explicit support (and simplified configuration) for Node.js, Python, and .NET Core</p>
  <h3>.NET Core (docker-build)#</h3>
  <h4>Minimal configuration using defaults</h4>
  <p>When you build a .NET Core-based Docker image, you can omit the <code>platform</code> property and just set the <code>netCore</code> object (<code>platform</code> is implicitly set to <code>netcore</code> when <code>netCore</code> object is present). Note that <code>appProject</code> is a required property:</p>
  </blockquote>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;version&quot;: &quot;2.0.0&quot;,
    &quot;tasks&quot;: [
      {
        &quot;label&quot;: &quot;Build Node Image&quot;,
        &quot;type&quot;: &quot;docker-build&quot;,
        &quot;netCore&quot;: {
          &quot;appProject&quot;: &quot;${workspaceFolder}/project.csproj&quot;
        }
      }
    ]
  }
  </code></pre>
  <blockquote>
  <h4>Platform defaults</h4>
  <p>For .NET Core-based images, the <code>docker-build</code> task infers the following options:</p>
  </blockquote>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Property</th>
  <th>Inferred Value</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td><code>dockerBuild.context</code></td>
  <td>The root workspace folder.</td>
  </tr>
  <tr>
  <td><code>dockerBuild.dockerfile</code></td>
  <td>The file <code>Dockerfile</code> in the root workspace folder.</td>
  </tr>
  <tr>
  <td><code>dockerBuild.tag</code></td>
  <td>The base name of the root workspace folder.</td>
  </tr>
  </tbody>
  </table>
  </div>