I was trying many ways. Reinstall many time. But I am not able to run docker windows container.
I use windows 11
Docker version : 4.20.1
In my machine linux container works. But when I switch to windows one it give me following error when I run docker version command.
error during connect: in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect: Get “http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version”: open //./pipe/docker_engine: The system cannot find the file specified.
Client:
Cloud integration: v1.0.33
Version: 24.0.2
API version: 1.43
Go version: go1.20.4
Git commit: cb74dfc
Built: Thu May 25 21:53:15 2023
OS/Arch: windows/amd64
Context: default
If your admin account is different to your user account, you must add the user to the docker-users group. Run Computer Management as an administrator and navigate to Local Users and Groups > Groups > docker-users. Right-click to add the user to the group. Log out and log back in for the changes to take effect.
I know you wrote Linux containers work, but maybe that doesn’t require an admin account because in case of the WSL backend. I am guessing, because I rarely work on Windows.
Then I’m sorry, but I don’t know why you get the error message. Maybe an antivirus blocked some Docker services. It happened before. You could try to temporarily disable your antivirus preferrably without connecting to the internet during that time.
Here is 2026 I still get this. How does one get to the docker desktop when one cannot get past the “For security reasons C:\ProgramData\DockerDesktop must be owned by an elevated account” error on installation?
Yes installing from an adminstrative powershell.
I answered this myself, but so as to leave breadcrumbs for the next dev:
Just solved this for a user. You don’t need CMD or PowerShell.
1. Delete C:\ProgramData\DockerDesktop if present
2. Run Docker installer as administrator (right click on exe, “Run as administrator”)
3. Installer should work fine
The problems is that the installer is janky and doesn’t ask for elevation on it’s own like it should do.
So if you run it without elevation it creates the folder C:\ProgramData\DockerDesktop without admin privileges and THEN it complains the folder is not owned by an elevated account (DUH!)
And if you run it with elevation afterwards it will still fail because C:\ProgramData\DockerDesktop was created improperly. That’s why you have to make sure DockerDesktop doesn’t exist already and delete if it does.
Edit: gave the instructions to a second user and it worked for him too
Thank you guys. Deleting C:\ProgramData\DockerDesktop and running as administrator worked for me. One thing noticed is even if you deleted C:\ProgramData\DockerDesktop but forgot to run as administrator, it will recreate this folder again. So want to clear that again.