microsoft / microsoft/vscode-remote-release

Azure CLI credentials not passed through to container

Open
#5,937 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

containers feature-request
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

  • VSCode Version: 1.62.3
  • Local OS Version: macOS 20.6.0
  • Remote OS Version: mcr.microsoft.com/vscode/devcontainers/python:0-3.9-buster
  • Remote Extension/Connection Type: Docker
  • Logs: /

Steps to Reproduce:

  1. Run az account show in a local terminal:
az account show
{
  "environmentName": "AzureCloud",
  "homeTenantId": "...",
  "id": "...",
  "isDefault": true,
  "managedByTenants": [
    {
      "tenantId": "..."
    }
  ],
  "name": "...",
  "state": "Enabled",
  "tenantId": "...",
  "user": {
    "name": "...",
    "type": "user"
  }
}
  1. I have the following in my devcontainer.json:
	"features": {
		"git": "os-provided",
		"azure-cli": "latest"
	},
  1. Run az account show in a terminal inside the container
vscode ➜ ~ $ az account show
Please run 'az login' to setup account.

To make sure it is not related to my environment, I created a completely new project based on the same container and had the same issue.

Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the devcontainer.json features configuration and the azure-cli feature, then reproduce the behavior with az account show on the host and inside the Docker container. Trace how credentials are expected to be passed into the container; done means the same account is available inside without running az login.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, docker
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.