docker-archive / cloud-integration-beta

Docker CLI with ACI integration (beta)
https://www.docker.com
32 stars 14 forks source link

WSL2 Azure Login not portable accross various WSL setups #31

Closed gtardif closed 4 years ago

gtardif commented 4 years ago

Description

WSL2 Azure login opens a browser to perform Azure login steps. Currently it opens a browser with wslview <url>. This is not portable accross WSL setups and sometimes blocks users to log into Azure. We need to

Steps to reproduce the issue:

Thanks @karolz-ms for repro details :
On my Ubuntu 20.04 distro:

karolz@karolzp1:~/code$ wslview http://www.microsoft.com
(nothing happens)
karolz@karolzp1:~/code$ echo $?
1

On my Ubuntu 18.04 distro:

karolz@karolzp1:~/code$ wslview http://www.microsoft.com
wslview: command not found

☹ I am pretty sure this is due to me disabling the Windows interop. Just FYI:

karolz@karolzp1:~/code$ cat /etc/wsl.conf 
[interop]
enabled=false
appendWindowsPath=false

Output of docker version: tested on build shared with MSFT v0.1.12-alpha1

gtardif commented 4 years ago

@benhillis, would you have any recommendation to have a more portable way to open a web browser from WSL2, replacing wslview <url> ? (Your name was suggested by @simonferquel for this). Thx in advance !

BigMorty commented 4 years ago

I think falling back to device code flow like 'az login' does is fine.

gtardif commented 4 years ago

That will be fixed in next release

BigMorty commented 4 years ago

Awesome,. thanks

gtardif commented 4 years ago

The fallback to device code flow has been released now.