Home > front end >  How to use docker in windows 10?
How to use docker in windows 10?

Time:01-27

I am trying to use docker on my windows, but kept getting the docker: error during connection: This error may indicate that the docker daemon is not working. I have used all the solutions described on the Internet, but so far I have not been able to solve my problem.

For example, I applied all the answers with good evaluation of this one error during connection: This error may indicate that the docker daemon is not working.

  • Some of the things I have done:
  1. Launch command: & 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon
  2. I have already uninstalled and installed docker again, using the installer as administrator.
  3. I have changed the initialization type of the docker desktop service to as Automatic (Delayed).
PS C:\Users\diego\Stuffs\RiseIT\getting-started> & 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon
PS C:\Users\diego\Stuffs\RiseIT\getting-started> docker run -d -p 80:80 docker/getting-started

docker: error during connect: This error may indicate that the docker daemon is not running.: Post "http:////./pipe/docker_engine/v1.24/containers/create": open //./pipe/docker_engine: The system cannot find the file specified.
See 'docker run --help'.

CodePudding user response:

I was having the same problem, in my case, I had forgotten to Enable the WSL 2 feature on Windows. You can enable it using the official tutorial https://docs.microsoft.com/en-us/windows/wsl/install-win10.

Or if you prefer you can follow these steps:

1 . (PowerShell Admin): dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

2 . (PowerShell Admin): dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

3 . RESTART THE COMPUTER

4 . (Download the Linux kernel update package): https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi>

5 . (PowerShell Admin): wsl --set-default-version 2

6 . (Install o docker): Tutorial: https://docs.docker.com/docker-for-windows/install/

  • Related