title: `docker context create aci` `--location` argument seems to have no effect
body: <p>When using docker compose to deploy a container group to Azure Container Instances, the <code>--location</code> argument specified when creating the docker context for aci, <code>docker context create aci...</code>, appears to have no effect.</p>
  <p>I'm following <a href="https://docs.microsoft.com/en-us/azure/container-instances/tutorial-docker-compose" rel="nofollow noreferrer">these azure instructions</a> for using docker compose with azure container instances
  and <a href="https://docs.docker.com/cloud/aci-integration/#create-an-aci-context" rel="nofollow noreferrer">this docker documentation</a> showing the additional arguments for the <code>docker context create</code> command</p>
  <h1>Steps to re-produce</h1>
  <h2>Pre-requisites:</h2>
  <p>Azure CLI</p>
  <pre><code>λ az version
  {
    &quot;azure-cli&quot;: &quot;2.22.1&quot;,
    &quot;azure-cli-core&quot;: &quot;2.22.1&quot;,
    &quot;azure-cli-telemetry&quot;: &quot;1.0.6&quot;,
    &quot;extensions&quot;: {}
  }
  </code></pre>
  <p>Docker</p>
  <pre><code>λ docker-compose --version
  docker-compose version 1.29.0, build 07737305
  </code></pre>
  <p>Docker Compose</p>
  <pre><code>λ docker --version
  Docker version 20.10.5, build 55c4c88
  </code></pre>
  <h2>Steps:</h2>
  <ol>
  <li>Log into azure via the cli <code>az login</code></li>
  <li>Authenticate docker with azure <code>docker login azure</code></li>
  <li>Create an azure resource group in a specific location <code>az group create -l uksouth -n test-aci-ctx-group</code></li>
  <li>Create a docker context specifying a location different to the resource group location <code>docker context create aci aci-context-eastus --resource-group test-aci-ctx-group --location eastus</code></li>
  <li>Display the information about the new context. <code>docker context inspect aci-context-eastus</code></li>
  <li><strong>Expected result:</strong> a context bound to the location specified as <code>--location</code> for the <code>docker context create</code> command, i.e.,  eastus</li>
  <li><strong>Actual result:</strong> a context bound to the same location as the azure resource group, i.e., uksouth</li>
  </ol>
  <pre><code>λ docker context inspect aci-context-eastus
  [
      {
          &quot;Name&quot;: &quot;aci-context-eastus&quot;,
          &quot;Metadata&quot;: {
              &quot;Description&quot;: &quot;test-aci-ctx-group@uksouth&quot;,
              &quot;Type&quot;: &quot;aci&quot;
          },
          &quot;Endpoints&quot;: {
              &quot;aci&quot;: {
                  &quot;Location&quot;: &quot;uksouth&quot;,
                  &quot;ResourceGroup&quot;: &quot;test-aci-ctx-group&quot;,
                  &quot;SubscriptionID&quot;: &quot;xxxxxxxxxxxxxxxxxxx&quot;
              },
              &quot;docker&quot;: {
                  &quot;SkipTLSVerify&quot;: false
              }
          },
          &quot;TLSMaterial&quot;: {},
          &quot;Storage&quot;: {
              &quot;MetadataPath&quot;: &quot;xxxx&quot;,
              &quot;TLSPath&quot;: &quot;xxxx&quot;
          }
      }
  ]
  </code></pre>
  <p>The ultimate manifestation of this issue is that I am unable to create a container group in azure because I'm working in the context of a resource group which I cannot change, but the resource group is in a location that does not support Azure Container Instances.
  When I try and issue the <code>docker-compose up</code> command in the aci context that I <em>thought</em> I created in a location that <em>supports</em> azure container instances, I get a location not supported error, listing the location of the resource group and not the location I specified for the docker aci context.</p>
  <p>Am I misunderstanding the purpose of the <code>--location</code> parameter?</p>
  <p>I know you <em>can</em> mix and match locations between a container instance and a resource group because I am able to create a container instance via azure cli with a location different to that of the resource group that it is linked to.</p>