The Wayback Machine - https://web.archive.org/web/20260215131434/https://github.com/docker/for-win/issues/12622
Skip to content

Docker Desktop fails to start in some cases due to an incorrect WSL command #12622

@andreas-ateles

Description

@andreas-ateles
  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features Not applicable
  • I have uploaded Diagnostics Not applicable
  • Diagnostics ID: Impossible, Docker Desktop doesn't start

Expected behavior

Docker Desktop starts when executing it. The UI/tray icon is available.

Actual behavior

When Docker Desktop is starting it runs the command:

wsl.exe bash -ic "printenv KUBECONFIG"

And it just gets stuck there, never proceeding further. No UI or tray icon is ever shown.

Here's a screenshot of the process tree when this is happening:

screenshot

The issue

The problem with the command is that bash is ran in interactive mode (the -i flag), while it's run as a non-interactive command/shell.
And anything needing interaction in ones .bashrc will just wait and hang since there is no way for the user to interact with it.

Solution

The -i flag to the bash command should be removed. As the shell is non-interactive, and should not be flagged as interactive.

Background

In my case I'm using keychain to automatically add SSH keys to WSL2. This asks for the key passphrase when bash starts interactively. So it (Docker Desktop in my case) just gets stuck there and is unable to continue. (As a workaround for this it's possible to add a timeout to the interactive command to kill it after some time, but it shouldn't be needed in the first place.)

kubernetes-client/javascript?

While researching the issue the only place that Google was able to find this command was in kubernetes-client/javascript.

So I was assuming that it's coming from there and opened an issue there. But this assumption could be wrong, and they might just be doing a similar thing.

Information

  • Windows Version: 10 pro, x64
  • Docker Desktop Version: 4.6.1
  • WSL2
  • Not virtualized Windows

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