Forgot to say: Thank you!
Error response from daemon: open \\.\pipe\docker_engine_windows: The system cannot find the file specified
We’re doing the same. Moving from Docker Desktop and Windows / Linux container to Linux container only and Kubernetes everywhere. Rancher Desktop is the way to go, but I have to say - still not easy to switch everything, Docker is very well integrated in many dev tools and there are situations where we still need BuildKit. But, by doing container image builds in the CI/CD pipelines only - no need for Docker Desktop anymore.
Windows Container don’t work anymore at a lot of our machines for a few weeks now - no fix in sight. This will speed up the move away from it.
BuildKit can be used without Docker Desktop. It is just enabled by default in the Docker Daemon of Docker Desktop and isn’t in Rancher desktop. You can enable it by setting the environment variable
DOCKER_BUILDKIT=1 on the client side or use
docker buildx build instead of just
Ah, thanks for the hint - how does this work on a Windows machine? I get a Docker CLI and set the environment variable? Or do I need to have Moby installed? https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=dockerce#windows-server-1
It should work with any docker client. You can set the environment variable globally or locally for the current shell any way you prefer on windows.
Example in PowerShell about Environment Variables - PowerShell | Microsoft Learn
But note that I was mainly writiing about Rancher Desktop and Docker Desktop for Windows running Linux containers on Windows 10 or Windows 11. Your link points to the description of Windows containers on Windows server. Docker Desktop is not officially supported on Windows server (I don’t know about Rancher Desktop) and buildkit supports only Linux containers.
This is ridiculous and shameful. Have now soon wasted the entire day fighting with this. Was working fine before update to 4.15…
Engine crashes before starting, event log shows:
"The description for Event ID 4 from source docker cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
failed to start daemon: Error initializing network controller: Error creating default network: failed during hnsCallRawResponse: hnsCall failed in Win32: The service has not been started. (0x426)
The request is not supported"
And after removing and installing older version (4.13), service doesn’t start due to:
fatal: failed to start daemon: Error initializing network controller: Error creating default network: failed during hnsCallRawResponse: hnsCall failed in Win32: The service has not been started. (0x426)
fatal: unable to configure the Docker daemon with file C:\ProgramData\Docker\config\daemon.json: open C:\ProgramData\Docker\config\daemon.json: The system cannot find the path specified."
No such folder even exists…
After pulling my hair out for a day, I have managed to get windows containers working again.
Things I did include:
- uninstall, reinstall, install old version, uninstall, remove windows features (containers etc), reinstall them and multiple reboots, disabling wsl, using hyper-v instead, changing to linux containers then back to windows containers…
- manually creating a switch manager in hyper-v manager, and adding it to the only virtual machine available
at some point I started getting a new error;
docker : Error response from daemon: open \.\pipe\docker_engine_windows: Access is denied.
After running dockerd manually from the command line.
This was eventually fixed by adding user permissions, using the guides at Allow access to the Docker Engine without admin rights on Windows - Axians Infoma
Maybe the new installer craps up the permissions, since only “NT AUTHORITY\SYSTEM” was listed in the permitted users? Not even local admins.
It seems after every boot I must now:
- manually run dockerd.exe in admin cmd
- run Import-Module dockeraccesshelper
- run Add-AccountToDockerAccess “domain\myuser”
And only then docker for windows works again. Great update, totally worth it.
Thanks for this link! That solved the issue for me.
I am getting this error with version 4.16.1, I have been pulling my hair because of this, nothing here worked (I wasn’t able to change the registry value to 1)
How I fixed it:
in a cmd run
wsl install -d ubuntu
if you get an error about a missing Linux kernel update package, download it and install it (link below), run wsl again, reinstall docker, problem solved.
I decided to download version 4.13.1 (just a random old select really) and the installation had a different message than the 4.16.1, it kept telling me that it needed to install wsl2, I accept, but kept doing that again and again.
So decided to stop the installation and install it manually
in cmd I ran
wsl --install -d ubuntu
got some problem to run it, kept complaining about an install is in process, but eventually worked (I think I had to uninstall the 4.13.1 version to get it to work)
Then the install started the ubuntu cmd which was throwing an error about the Linux kernel update package missing, so searched for it and downloaded and installed it
after that, ran the wsl --install command again
it said ubuntu already installed, and opened the ubuntu cmd again, no errors this time, asked me to create a user and password, worked fine then into the linux prompt
I decided to just run the 4.16.1 installation again, and it finished, ran the command that was throwing the main error of this thread and it worked, image added and problem fixed.
Thanks, this was the last one I tried and it worked.
Hi shamar77, your suggestion worked me…thanks. Quite helpful.
Not sure what’s going on but Dockers wsl2 integration is straight fucked no if ands or buts. This is how you fix
open //./pipe/docker_engine: The system cannot find the file specified. issue … download microsoft process explorer and stop all docker and if necessary (most likely will be) all wsl processes (just search wsl in the top right search function) once all processes are ended you can start them as well as docker again no problem. For some reason Docker decides to use your default WSL distro (even though I explicitly turned that off in settings it just seems to disregard that or change the setting on next restart) instead of creating it’s own and also starting like 10 processes and that’s without any containers. This is a multimillion dollar company fix your shit. After a couple days of trying to figure out how to get windows containers working I still don’t know but i’ll report back if i figure it out.