Skip to content

docker login and docker pull are abysmally slow (to start) in WSL 2 #12995

@kallja

Description

@kallja
  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: A324418D-5D19-41CF-B2BC-C7F37B376055/20221003093353

Actual behavior

In WSL2 (Ubuntu), certain Docker commands such as docker login and docker pull take a very long time before actually starting. The commands seem to hang for a long while before getting to their main business.

  • docker login hangs between 5 and 7 minutes to provide the username prompt,
  • docker pull hangs between 5 and 7 minutes before logging download of the first layer

Please note the above times are times it takes before the commands actually start doing what they're going to do. Once docker pull starts downloading layers, it performs it's remaining actions quickly as one would expect.

In the native Windows CLI the same commands perform in seconds, as expected.

The issue always manifests. What I've tried to rule out:

  • DNS. dig docker.io completes instantaniusly
  • Network conditions. Issue manifests in different networks, with and without VPN applications running in Windows.

Expected behavior

Docker CLI commands run in a timely manner.

Information

  • Windows Version:
    Edition	Windows 11 Pro
    Version	22H2
    Installed on	20/09/2022
    OS build	22621.521
    Experience	Windows Feature Experience Pack 1000.22634.1000.0
    
  • Docker Desktop Version: v.4.12.0
  • WSL2 or Hyper-V backend?: WSL2
  • Are you running inside a virtualized Windows e.g. on a cloud server or a VM: No.
  • I'm using a Windows account from Azure AD (probably root cause, I also tested using a local Windows user and the same issue manifests with that user, too)
    • the user account is not an administrator on the local machine
    • "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check incorrectly reports that the account is not a member of docker-users. It is.
    • docker commands work as expected under Windows.

As others have pointed out in #10247 (comment), removing the "credsStore": "desktop.exe" fixes the performance but that hardly seems the ideal solution.

I've tried the steps described in #10247 (comment) but those didn't solve the issue for me.

Output of & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check

Steps to reproduce the behavior

Exact setup steps unknown.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions