69

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?

Sangita Satapathy
  • 893
  • 1
  • 6
  • 9

28 Answers28

78

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

JanBrus
  • 1,198
  • 9
  • 13
  • In my case, I got this error only the first time after I've installed Docker Desktop. In any case, restarting was the solution to the problem. – Mario Jun 08 '23 at 05:26
50

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

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

./DockerCli.exe -SwitchLinuxEngine

This is the Simple way to solve this.

Amin Golmahalleh
  • 3,585
  • 2
  • 23
  • 36
Dhruv Mehta
  • 509
  • 4
  • 5
  • This works for me, and I would like to add I've got WSL running before I got Docker Desktop installed. – M.N. Feb 12 '23 at 09:37
13

Update 10 / 2022

I solved this issue by restarting WSL, as only restarting Docker was not solving it for me.

In my situation, Docker was running as expected before encountering this issue.

These are the steps I took

  1. Close Docker Desktop
  2. Open cmd and run wsl --shutdown
  3. Start Docker Desktop and press Restart on the notification below
    (It should pop up in a few seconds)

enter image description here

Michiel Pater
  • 22,377
  • 5
  • 43
  • 57
9

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.

questionto42
  • 7,175
  • 4
  • 57
  • 90
3

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

supernova
  • 3,111
  • 4
  • 33
  • 30
2

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.

Sangita Satapathy
  • 893
  • 1
  • 6
  • 9
2

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

Net stop com.docker.service

And then

Net start com.docker.service
Tyler2P
  • 2,324
  • 26
  • 22
  • 31
2

Tried a lot of things. Helped:

  1. Close Docker.

enter image description here

  1. Start Docker as administrator.

enter image description here

1

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

emccracken
  • 839
  • 12
  • 21
Tata E
  • 11
  • 3
1

I was facing the same issue while installing docker on windows 10. Later I could resolve the issue by updating the Linux kernel. Go to this link and update the package for x64 machine https://learn.microsoft.com/en-us/windows/wsl/install-win10#step-4---download-the-linux-kernel-update-package

1

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

tnwei
  • 860
  • 7
  • 15
1

In my case Docker Desktop was running fine but when I run docker pull for window image where as I also set switch to window container as well But I face this error Error response from daemon: open \.\pipe\docker_engine_linux: The system cannot find the file specified

Finally I fixed it by running the below command in powershell as an administrative mode

Enable-WindowsOptionalFeature -Online -FeatureName $("Microsoft-Hyper-V", "Containers") -All
1

Update Jan 2023

Follows up with @Michiel Pater's solution, in case wsl --shutdown hangs in your terminal, open task manager as administrator, find Windows Subsystem for Linux then kill it. After serveral seconds, press Restart from Docker Desktop notification

enter image description here

Dave Runner
  • 226
  • 1
  • 5
1

I was getting similar problem on window 10 so what i uninstall the verison 4.16 and install old version 4.13. From setting update of docker desktop i click on update to latest version and after it works Created all file that were missing earlier

esngsrj
  • 27
  • 6
0

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

Kartik Malik
  • 460
  • 4
  • 11
0

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

Nikita Koksharov
  • 10,283
  • 1
  • 62
  • 71
0

to solve this problem make sure you install one of the linux distribution like alpine or ubunto and that step alot of youtube vedio tutorial miss nowaday in 2022 and by the way this step is menthoned in the https://learn.microsoft.com/en-us/windows/wsl/install-manual and i mean here the step number 6 in the manual installation of windows subsystem for linux as short wsl => https://learn.microsoft.com/en-us/windows/wsl/install-manual

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 06 '22 at 08:31
0

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

  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/31809429) – zochamx May 24 '22 at 21:49
0

This message appeared while using IntelliJ service. Solutions for me was that Docker installed in windows should also be running and showing list of container. Once Docker desktop app shows container list. This docker was connected to intellij and error message was gone.

0

Solution For:

  1. Docker forever in "Docker is starting.." at Windows task
  2. Docker desktop is starting error
  3. Docker "unable to calculate image disk size"
  4. unable to calculate disk size docker
  5. failed to ping VM diagnosticsd with error:

Get "http://ipc/ping": open \.\pipe\dockerDiagnosticd: The system cannot find the file specified.

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

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

./DockerCli.exe -SwitchLinuxEngine

This is the simplest and best way to solve this.

helvete
  • 2,455
  • 13
  • 33
  • 37
SunnyWR
  • 1
  • 1
0

Purging data of HYPER-V, WSL 2 and Windows Containers did the trick for me. Purge data section is in troubleshooting. enter image description here

Furki4_4
  • 11
  • 1
0

I had the same issue ,I uninstalled the latest version and Installed Docker desktop 4.13, my problem is solved. here is the download link :

https://desktop.docker.com/win/main/amd64/89412/Docker%20Desktop%20Installer.exe

Pouria Saleh
  • 55
  • 1
  • 10
0

Error is resolved with latest Docker for Windows release 4.16.3 from 30. of January 2023.

Check here for details.

Hrvoje
  • 13,566
  • 7
  • 90
  • 104
0

In my case, only a clean re-installation helped unfortunately.

Caution: This will remove all local docker images and you'll have to rebuild them. Be aware that any files, any data in databases or data stored in REDIS services that "live" in your local docker containers are deleted by this approach. So you should consider it only if the other answers given to this questions do not work and you're able to restore the data from a backup!

The following steps give you a fresh, clean start with Docker:

  1. Uninstall docker desktop via Windows
    "Programs and Features" > "Uninstall or change a program"
  2. Delete the "Docker" folder in the %AppData% directory (which is usually "C:\Users\YOURPROFILE\AppData\Roaming"),
    and also ".docker" in C:\Users\YOURPROFILE (as suggested here)
  3. Restart Windows
  4. Download latest docker desktop from https://www.docker.com/products/docker-desktop/ and install it (run "Docker Desktop Installer.exe" from Admin shell)

A few additional hints:

  • It might not always be necessary to delete the folders (step 2), but it guarantees you start really with a fresh installation with factory settings
  • During the installation Docker asks (and recommends) to enable WSL2. In my case, I found that was causing the troubles I had - so I installed it again with this option disabled (note while you can disable it in the docker settings that didn't help in my case, I really had to disable it during installation).
    Before I did that, Docker stopped working again the next day when I turned on my PC. I could not find out why WSL2 was blocking the start up of Docker, but that workaround helped me - using Hyper-V instead.
    Note that some docker images require WSL2. In that case you can re-enable it again via Docker's context menu's settings "General". Before you do that, check if you need to repare WSL2 (as this might prevent Docker from starting) - repair it, then enable WSL2 in Docker.
Matt
  • 25,467
  • 18
  • 120
  • 187
0

I had to try a combination of the suggestions listed here. Also, I couldn't shutdown Docker Desktop. Powershell running as admin:

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchLinuxEngine

wsl --shutdown

Get-Process *docker* | Stop-Process

Then I started everything back up and it came to life.

Robert Brooker
  • 2,148
  • 24
  • 22
0

After a ton of searching and lots of uninstalls / reinstalls of Docker and WSL, this is the fix that worked for me:

  1. Navigate to %APPDATA%/Roaming/Docker
  2. Open the settings.json file
  3. Update the following lines:
"integratedWslDistros" : [ ]
"enableIntegrationWithDefaultWslDistro" : false,

Link to the original solution I found:

amkuchta
  • 33
  • 8
0

In my case it has been a line ending issue.

Some time ago I struggled with problems because of shellscripts containing CRLF.

So I've added "autocrlf=false" to .git/config in the project.

Later I manually set LF in Dockerfiles and yml because I thought "should be so".

This also resulted in not found / EOF messages for docker_engine in my Docker Desktop (Windows) and setting CRLF again in these files fixed the issue.

Gunnar
  • 383
  • 4
  • 18
-3

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"

  • Welcome to StackOverflow. Please consider explaining your answer. – Trevor V Aug 17 '22 at 02:51
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 17 '22 at 02:52