Error response from daemon: open \\.\pipe\docker_engine_linux: The system cannot find the file specified

Viewed 49463

While I am trying to start with docker on my windows 10 machine it is returning the following error.

ERROR: open \.\pipe\docker_engine_linux: The system cannot find the file specified.

I found when I logon to my computer, the hyper VM could not run docker virtual machine automatically though my docker desktop is running. Once I start docker virtual machine on hyper VM and restart docker once again, it works okay. But this is not a permanent solution. Could I get some help please?

14 Answers

Restarting Docker Desktop for Windows helped me. You can do that by right-click on tray icon and selecting restart.

The same problem with Me. I am writing this command in PowerShell Run As Administrator. Switch Docker from Windows to Linux write the command like this

cd "C:\Program Files\Docker\Docker"

./DockerCli.exe -SwitchLinuxEngine

This is the Simple way to solve this.

In my case, the reason for the error was even easier than the main answer ("close and open it again") suggests. Docker Desktop was just not running anymore!

When I hovered over the tray icon, it vanished.


Further details:

Docker Desktop had crashed, or it was closed because of a forced update. I had this problem after updating Java runtime environment.

When I opened Docker Desktop then, an update ran, and I could not even choose between yes or no, running for at least 5 minutes with the tray icon only showing "Docker Desktop is starting". The menu had crashed as well.

I am able to auto trigger docker VM start on Hyper V by enabling the following in setting :

enter image description here

While the error below error continuing till docker starts okay and containers are running okay.

ERROR: open .\pipe\docker_engine_linux: The system cannot find the file specified.

Try running the below commands in the Powershell and start the docker

Net stop com.docker.service

And then

Net start com.docker.service

Try to add the folder with your project in Settings -> Resources -> File Sharing. And click the button Apply & Restart

One way of solving this problem is doing the following step again every time you open your pc:

# -------------------- enable the wsl for linux on windows ------------------- #
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

# ---------------------- enable virtual machine feature ---------------------- #
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

# ------------------------ set wsl as default version ------------------------ #
wsl --set-default-version 2

and then start docker desktop icon and docker engine will start without any porblem

I have my cloudflare WARP running that was causing this issue I just toggled it off and it worked.

I updated docker to the latest version. Error has gone.

WSL 2 Installation was incomplete. After doing a 'restart' on Docker, it prompted me to get the Linux Kernel installed.

My Docker Desktop was sort of freezing and was not starting up. Just kept showing Starting... for ever. Any docker command in terminal was throwing same exception "Error response from daemon: open \.\pipe\docker_engine_linux:". I tried some options a mentioned above, didn't worked on Windows 10. I just went to Windows Services ( In search box type "services"). Look for "Docker Desktop Service". Stop and Start it once. Then try starting your Docker Desktop again. It came up back super fast.

enter image description here

ERROR: C:\Users\user1>docker run hello-world docker: Error response from daemon: open \.\pipe\docker_engine_linux: The system cannot find the file specified. See 'docker run --help'.


solution:

use this command => cd "C:\Program Files\Docker\Docker"

Related