Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to create an ACI context in Azure China/Azure Germany account #2775

Closed
v-ruizh opened this issue Mar 15, 2021 · 4 comments · Fixed by #2808
Closed

Fail to create an ACI context in Azure China/Azure Germany account #2775

v-ruizh opened this issue Mar 15, 2021 · 4 comments · Fixed by #2808

Comments

@v-ruizh
Copy link

v-ruizh commented Mar 15, 2021

OS: Win 10
Build Version: 20210312.1
Docker Desktop: 3.2.1 (61626)
image

Repro Steps:

  1. Sign in with Azure China account.
  2. Try to create an ACI context.

Expect:
Succeed to create an ACI context.

Actual:
Fail to create an ACI context.

Creating ACI context "serere-ch1"...
Error: Process 'docker context create aci serere-ch1 --subscriptio...' exited with code 1
Error: could not find the requested subscription from your Azure login. You might need to specify a tenant ID with docker login azure --tenant-id xxx 

More Info:
This issue also reproduces in Azure Germany account.

@bwateratmsft
Copy link
Collaborator

Closed the wrong item.

@bwateratmsft
Copy link
Collaborator

Looks like ACI is supported in both Germany and China. @karolz-ms do you know what we might need to change to get this working there? Looks like we may at least need to specify a tenant ID?

@karolz-ms
Copy link
Contributor

Ah, yes, I should have opened an issue about this. When working with clouds other than Azure public cloud, we will need to specify --cloud-name when doing docker login azure. In case of Azure China it is "AzureChinaCloud".

C:\code>docker login azure --help
Log in to azure

Usage:
  docker login azure [flags]

Flags:
      --client-id string       Client ID for Service principal login
      --client-secret string   Client secret for Service principal login
      --cloud-name string      Name of a registered Azure cloud
  -h, --help                   Help for azure
      --tenant-id string       Specify tenant ID to use

The list of well-known clouds is defined here https://github.com/docker/compose-cli/blob/main/aci/login/cloud_environment.go#L166 but there might be other clouds than the well-known ones, so we should allow the user to type a name too, in addition to giving them the well-known choices.

@bwateratmsft
Copy link
Collaborator

This fix is now released with Docker extension version 1.12.0.

@vscodebot vscodebot bot locked and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants