User account does NOT have permission to run docker commands

On Windows systems, if you receive a permission error when trying to run Docker commands inside a Windows container, it may be because the user account running the Docker command doesn’t have the necessary permissions to access the Docker daemon.

To resolve this issue, you can either:

  1. Run the Docker command as an administrator by right-clicking on the Command Prompt or PowerShell and selecting “Run as administrator”.
  2. Add the user account to the Docker group on the host system. You can do this by going to the “Local Users and Groups” section in the Computer Management console and adding the user account to the “DockerDesktopUsers” group.
  3. Add the user account to the Hyper-V Administrator group on the host system. You can do this by going to the “Local Users and Groups” section in the Computer Management console and adding the user account to the “Hyper-V Administrator” group.

Note that these changes will require a logout/login or a reboot of the host system for the changes to take effect.

Thank you and Regards,
Tharanga Chandrasekara

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?