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

Docker: This error may also indicate that the docker daemon is not running. & Use the WSL 2 based engine (Windows Home can only run the WSL 2 backend) settings check box greyed out on Windows 11 #12548

Closed
Tasker-AI opened this issue Feb 13, 2022 · 5 comments

Comments

@Tasker-AI
Copy link

Tasker-AI commented Feb 13, 2022

The original issue was closed, and did not have the solution for me.
https://github.com/docker/for-win/issues/1825

I am using Windows 11.
This was a first time docker install.

First issue:
Docker desktop was 'stopped'

Solution:

  • Follow the official steps on how to install WSL 2 at https://docs.microsoft.com/en-us/windows/wsl/install
  • Open PowerShell and run command:
    wsl --update
  • Uninstall Docker.
  • Delete temporary data:
    C:\Users\<USER>\AppData\Roaming\Docker
    C:\Users\ProgramData\Docker
    C:\Users\ProgramData\DockerDesktop
  • Reinstall Docker, ensure wsl box is ticked during install.
  • Restart computer.
  • Run Docker as administrator.
  • Run PowerShell as administrator.
  • Run the following command:
    & 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon
  • If this doesn't work, you may need to run the above command one or two more times.

Second issue:
Docker desktop settings check box 'Use the WSL 2 based engine (Windows Home can only run the WSL 2 backend)' was greyed out and unchecked.

Solution:

  • Open:
    C:\Users\<USER>\AppData\Roaming\Docker\settings.json
  • Change: "wslEngineEnabled": false to "wslEngineEnabled": true
  • Reinstall Docker. (not sure if necessary.)
  • Restart computer. (not sure if necessary.)
  • Run Docker as administrator.
  • Run PowerShell as administrator.
  • Run the following command:
    & 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon
  • If this doesn't work, you may need to run the above command one or two more times.
@KushpreetViria
Copy link

Thank you! You saved me literal hours!

@Tasker-AI
Copy link
Author

Thank you! You saved me literal hours!

Glad it helped someone! That took me 8 hours hahaha

@senst-dev
Copy link

Thanks for this, been struggling with this for a while! Just to confirm, when I previously ran & 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon twice I could get Docker Desktop working but with when running docker commands eg docker version, would produce the error: docker: error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/create": open //./pipe/docker_engine: The system cannot find the file specified. My "Use the WSL 2 based engine" checkbox was also greyed out and unchecked.

Changing wslEngineEnabled to true and then re-running Docker as admin along with & 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon in Powershell as admin fixed issues without having to reinstall docker.

@mat007
Copy link
Member

mat007 commented Feb 14, 2022

Hi, thanks for reporting, and sorry about the inconvenience, I’ll close this issue in favor of #12545 which has a temporary workaround until we release Desktop 4.5.1

@mat007 mat007 closed this as completed Feb 14, 2022
@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Mar 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants