87

I am getting the following error,

The current user is not in the 'docker-users' group. Add yourself to the 'docker-users' group and then log out and back in to Windows.

How do I resolve this error on Windows?

1
  • I have this problem too, but in Windows 7 Home Premium...
    – Mc_Topaz
    Jun 16, 2020 at 6:20

5 Answers 5

148

Run this command from an administrator command window to add your user id to the docker-users group and log back into your user account for it to take effect.

net localgroup docker-users "your-user-id" /ADD

your-user-id is your local Windows user name. You can determine this by looking at the folder name under C:\Users\ .

11
  • 35
    In case it's useful for somebody, if your user is in a corporate domain, you can do: net localgroup docker-users "DOMAIN\your-user-id" /ADD
    – Berna
    Sep 17, 2021 at 8:11
  • 2
    Worked for me by using: net localgroup docker-users "<my-system-name>" /ADD Oct 29, 2021 at 20:43
  • 1
    I had to reboot after using this, then it worked! thanks! Mar 9, 2022 at 19:06
  • 2
    What do I do if I get access denied?
    – Pete
    May 5, 2022 at 16:35
  • 8
    your-user-id is your local Windows user name. you can determine this by looking at the folder name under C:\Users\ . For example if you have: C:\Users\Joe Bloggs and you know that this is the user logged in, then your-user-id is Joe Bloggs with the double quotes around it, so the full command would be: net localgroup docker-users "Joe Bloggs" /ADD. I found this to work in my case - the command reponse was: The command completed successfully. Further advice from above is then to restart your machine for this change to take effect. Aug 6, 2022 at 14:24
10

It might occur that the user-group "docker-users" not exist on your machine. In that case enter the following commands in the Powershell

New-LocalGroup -Name 'docker-users' -Description 'docker Users Group'

Add-LocalGroupMember -Group 'Administrators' -Member ('docker-users') –Verbose

Add-LocalGroupMember -Group 'docker-users' -Member ('Username','Administrators') –Verbose
1
  • when I run the first command in the powershell, following error occurs New-LocalGroup : The term 'New-LocalGroup' is not recognized as the name of a cmdlet
    – Hamad
    Feb 25, 2022 at 14:22
2

Try restarting the system, that worked for me, as it pushed me to the group automatically.

1

If you are installing Docker Desktop from Chocolatey, you might only need a restart, as you are put in that group automatically.

0

In my case, I just uninstall and reinstall the docker. And it fine now.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.