Newbie in this area. I have installed the new version of Docker in my windows PC. I am using windows 10 Pro. I have tried the very basic docker command but it is not working. I have also run the docker as administrator. Getting the below error always
4docker: error during connect: Post : open //./pipe/docker_engine: Zugriff verweigert 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.
16 Answers
Doing an combination of following two things might help :
- Exit docker from tray (lower right hand of the windows desktop) - Relaunch it as administrator (Start Menu --> Type "Docker" --> Right Click the icon --> "Run as Administrator" Please see if you still get the error.
1Seems to be related to the below issue:
2I had the same issue - I was able to resolve the issue by running power shell with Admin privs. I validated this was the same behavior for running the commands via elevated cmd prompt. It also enabled docker run hello-world command which was returning the error message ...Access is denied. 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.
I did the following :
In windows you can go to the show hidden icon in the taskbar, hover your cursor on the docker icon and right click then a drop down menu will be shown and from that click restart.
press windows key + R
%appdata%\Docker
delete all the the files in the folder
killed the docker process in task bar.
try to open docker gui again.
check out this link if none of the above works, check out this link : Docker cannot start on Windows
- if nothing is work try to uninstall and reinstall the docker.
What worked for me:: First clicking on troubleshoot and then doing reset to factory defaults. 
Warning: the existing containers will be gone
If you don't have any WSL installed :
- Ensure that the Hyper-V feature enabled, you can do this by searching "Turn Windows features On or Off".
- Using Docker desktop, disable the option to "Use the WSL 2 based engine"(which is recommended, so only use if you don't have any WSL installed).Docker desktop settings
In case, Docker Deamon is still not running when using it for the first time, this video might help. I solved this issue by downloading WSL 2 file and installing it manually on my windows machine.
I also have the same error while i try to run docker, the problem in my case is i never install WSL2 linux kernal in my window. After installation my docker running well. follow these steps to make your docker running well in windows. First uninstall your current docker and make sure your window have the following features:
- Hyper-V installed and working
- Virtualization enabled in the BIOS
- Hypervisor enabled at Windows startup
This link guide you to complete above steps
Now open this link to download the WSL 2 linux kernal pakage
After the installation of WSL 2 is done. Install your docker again, follow the instructions and it will work perfectly.
By simply opening the Docker on the desktop just and restarting the Docker, you can easily resolve it. Open the troubleshoot of Docker and restart the docker as shown in this image. Troubleshooting docker
2I faced the same issue and what worked for me is
Navigate to the below link, download and install the Linux kernel update package (step4)
Make sure to restart your system after installation
What worked for me:
Go to Docker Desktop > Troubleshoot (the bug icon) > Reset to factory defaults. All containers need to be pulled again from registry but was up again in no time.
Hope this works for someone!
After installation of Docker connect to PowerShell as admin and run below command.
It will start the Docker service.
Step 1> cd "C:\Program Files\Docker\Docker"
Step 2> ./DockerCli.exe -SwitchDaemon
Two things:
- Run the docker as administrator
- Run Powershell as administrator
and see the trick.
This thread was one of the first that I found, so wanted to compile some of the solutions I've found for various issues. I am using Windows 11 & a first time docker install.
Issue 1: Docker desktop was 'stopped' and whenever I tried to run a package in the terminal I was getting a long message ending in: This error may also indicate that the docker daemon is not running.
Solution:
Follow the official steps on how to install WSL 2 at
Open PowerShell and run command: wsl --update
Uninstall Docker.
Delete temporary data:
C:\Users<USER>\AppData\Roaming\Docker
C:\Users\ProgramData\Docker
C:\Users\ProgramData\DockerDesktop
Reinstall Docker, ensure wsl box is ticked during install.
Restart computer.
Run Docker as administrator.
Run PowerShell as administrator.
Run the following command:
& 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon
If this doesn't work, you may need to run the above command one or two more times.
Issue 2: Docker desktop settings check box 'Use the WSL 2 based engine (Windows Home can only run the WSL 2 backend)' was greyed out and unchecked.
Solution:
Open: C:\Users<USER>\AppData\Roaming\Docker\settings.json Change: "wslEngineEnabled": false to "wslEngineEnabled": true
Reinstall Docker & restart computer. (not sure if necessary.)
Run Docker as administrator.
Run PowerShell as administrator.
Run the following command:
& 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon
If this doesn't work, you may need to run the above command one or two more times.
I got this error because my Docker Desktop was not running. Resolved by starting Docker Desktop.
You can use cmd in centos 7
systemctl restart docker
Yes, suggested solution worked for me.
After installation of Docker connect to PowerShell as admin and run below command. It will start the Docker service.
C:\Program Files\Docker\Docker/DockerCli.exe -SwitchDaemon