The docker client must be run elevated to connect
Solution 1
I have encountered this problem myself. My problem was that I had configured Docker Desktop to not run at startup. As long as Docker Desktop is not running, you will not have the Docker daemon running, hence the error.
Quickly check whether you have a white whale in your taskbar before trying any more exotic solutions.
Solution 2
Try this:
"Hardware assisted virtualization and data execution protection must be enabled in the BIOS" Typically, this problem is due to a disabled Hyper-V or because the hypervisor agent is not running. Open a Windows shell as administrator and enable Hyper-V with:
dism /Online /Enable-Feature:Microsoft-Hyper-V /All
Reboot your machine and see if Docker for Windows starts. If the above doesn't work, open a Windows shell as administrator and enable the hypervisor with:
bcdedit /set hypervisorlaunchtype auto
If Docker for Windows is still not working properly, try the following additional solutions, which are based on instructions extracted from this Docker for Windows issue thread.
Reboot your machine and see if Docker for Windows starts. Copy this path: Control Panel\Programs\Programs and Features into a File Explorer address bar.
Click Turn Windows feature on or off on the left side of the Control Panel. Clear the Hyper-V check box in the list of Windows features.
Reboot your machine and start Docker for Windows (or reinstall if necessary). If the above doesn't work, then Virtualization Based Security (VBS) might be interfering and needs to be disabled. Try the following to disable VBS: Open the Local Group Policy Editor (gpedit.msc)
Go to Computer Configuration\Administrative Templates\System\Device Guard Disable VBS.
Solution 3
I had a similar issue : Docker Desktop was configured to run Linux containers but my Visual Studio project targeted Windows containers.
So after launching Docker, I right-clicked the whale (was red) in the taskbar's tray and selected the 'Switch to Windows containers' menu item.
An error message showed up talking about 'Deny write access for fixed drives not protected by Bitlocker' which was fixed by launching a regedit and putting a 0 for the following key : Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies\Microsoft\FVE\FDVDenyWriteAccess
Then repeating the tray action finally worked and the whale turned to white.
Solution 4
Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Solution 5
try this on your CMD:
docker-machine create box
docker-machine env box
this issue still open
Ashwani Panwar
Updated on May 31, 2021Comments
-
Ashwani Panwar over 1 yearWhen I am trying to built docker app, I am getting below error. Command I am running is
docker build -t node_curd_exe .error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=h3q9gxeprezyco28agiqe9jp2&shmsize=0&t=node_curd_exe&target=&ulimits=null&version=1: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.Anything else I can do ?
-
7_R3X over 3 yearsGo to the directory where the Docker is installed on your Windows installation drive and find a file named "Docker for Windows.exe", right click it and run it as administrator. See if it solves the problem.
-
-
user9999 about 1 yearGood place to start. Mine docker wasn't starting at all, had to reinstall it. -
kame about 1 yearBut my docker is running :/ -
saadoune about 1 yearWorked for me ! only had to execute the first command and reboot, thanks a lot