You must be in the docker users group windows 10

Expected behavior Start Docker Daemon Actual behavior I am receiving a message saying: You are not allowed to use Docker . You must be in the "docker-users" group. Information SO: Windows...

I just ran into this while trying to upgrade to 17.12.0-ce-win47. That’s what I get for clicking the nice pretty upgrade button. Now, my user is already in the docker-users group. Yet, I can’t delete the Docker folder.. quite maddening. Time to dig through Windows security BS to get this fixed.

Access to the path 'C:Program FilesDockerDockerBugsnag.dll' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at LightweightInstaller.UnpackArtifactsStep.<DoAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at LightweightInstaller.InstallWorkflow.<HandleD4WPackage>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at LightweightInstaller.InstallWorkflow.<ProcessAsync>d__18.MoveNext()

After installing docker on my Windows 10 machine, When I tried to open the docker desktop application encountered with You are not allowed to use Docker . You must be in the “docker-users” group error.

To resolve this issue, You need to add your user to docker-users named group created under Computer Management/user and groups/groups

screenshot

Click on docker-users and add your username in the group.

docker

Apply the changes and then you need to restart your windows to let the changes come in effect

afterdocker

Note: You can refer “Docker Deep Dive” book if you want to understand the underlying concept of Docker. Very well designed for beginners and people who are looking to enhance their knowledge. It can also help you crack the interviews for DevOps with Docker concepts

Published by codenamebazinga

Just Another Geek!
View all posts by codenamebazinga

Published
October 10, 2019July 3, 2021

I know I need admin rights to install Docker Desktop; but do I have to be an admin to run it? The documentation doesn’t say that I do, and Googling doesn’t suggest that either; but if I try to run it as a non-privileged user, the process is killed instantly and I get an event-log entry saying «Process requires elevated rights to run.»

I’m running Windows 10 Enterprise in a corporate environment and we have non-privileged accounts. Is Docker Desktop not available in this situation or have I just installed it incorrectly somehow?

asked Nov 1, 2019 at 18:10

Ed Graham's user avatar

As of Docker Desktop 2.4 (possibly earlier, I haven’t tested) this is supported. From the Windows installation instructions:

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.

answered Oct 4, 2020 at 2:29

Simon Brady's user avatar

Simon BradySimon Brady

1,7173 gold badges12 silver badges10 bronze badges

2

I have not tested it, but this article seems to indicate that you can.

TLDR;

Problem

The reason for requiring an admin session is that the Docker client in the default configuration uses a named pipe to connect to the Docker engine and that named pipe can only be accessed by administrators

Solution

To avoid this, you can simple allow your user FullControl access to that named pipe

Original author also provides a powershell tool with sources to help perform this admin task.

answered Jan 7, 2020 at 13:49

aboellinger's user avatar

3

The answer appears to be «no». I couldn’t understand how everyone else at work had avoided this problem; but then learnt that they had asked for admin rights over their local machines and been granted them! I’ve only been here for two and a half years … :|

answered Nov 29, 2019 at 22:58

Ed Graham's user avatar

Ed GrahamEd Graham

4,2363 gold badges27 silver badges29 bronze badges

1

Latest version of Docker desktop allows this, but the user should be in docker-users group.

If you are using Windows 10 Home edition, then adding multiple groups to a normal users will be a pain, even you use ‘netplwiz’.

To add a new group to user you can use the below command in Powershell.

Run the powershell as admin, then execute

 net localgroup "docker-users" "<user_name>" /add

i_want_more_edits's user avatar

answered Jun 4, 2021 at 5:24

Rijas Madurakuzhi's user avatar

2

I am able to run Docker Desktop from a non-administrator account on my Windows 10 machine. I can also issue docker commands from a non-elevated command prompt or PowerShell prompt. Note that my non-administrator account is a member of the local group docker-users.

Initially, I installed it from my administrator account, and things worked as expected, but only if I stayed logged in as administrator. If I wasn’t logged in as administrator, I would get the named pipe error that aboellinger described in his answer.

Simply launching C:Program FilesDockerDockerDocker Desktop.exe from my non-administrator account fixed the issue (after waiting a few seconds for the process to start). It didn’t even ask to elevate permissions.

answered Mar 19, 2020 at 15:12

JamesQMurphy's user avatar

JamesQMurphyJamesQMurphy

4,1071 gold badge36 silver badges40 bronze badges

6

The addition of my user account to group docker-users solved my problem. However, since I’m not running Win10 Pro, the GUI access to account control is not available. Instead I ran PowerShell as admin and added my user account to group docker-users there.

answered Dec 16, 2020 at 21:50

Doug Hirsch's user avatar

1

Docker is insecure by design, if a user can run docker command without admin rights (.i.e. belongs to docker group) this basically means that this user can escape the container and become admin on the host. No idea how exactly it can be done on Windows but it «just works» on Linux.
What is the Docker security risk of /var/run/docker.sock?

answered Aug 11, 2020 at 12:04

mestia's user avatar

mestiamestia

4502 silver badges7 bronze badges

Docker is a platform for creating and deploying applications in self-sufficient containers. The installation of Docker is pretty easy in Linux, but this is usually not the case with Windows. In this post, I will show you how to install Docker in Windows 10 or Windows 11 in multiple ways. You’ll learn there is indeed a way that makes the Docker Desktop installation in Windows as simple as in Linux.

Contents

  1. Prerequisites
    • Docker with WSL2 backend
    • Docker with Hyper-V backend
  2. Install Docker using the GUI
  3. Install Docker using winget
  4. Install Docker using PowerShell
  • Author
  • Recent Posts

Surender Kumar has more than twelve years of experience in server and network administration. His fields of interest are Windows Servers, Active Directory, PowerShell, web servers, networking, Linux, virtualization, and penetration testing. He loves writing for his blog.

Latest posts by Surender Kumar (see all)

  • Extending LVM space in Ubuntu — Thu, Feb 2 2023
  • Backup in Proxmox VE — Thu, Jan 26 2023
  • Snapshots in Proxmox VE — Wed, Jan 25 2023

Prerequisites

You might already be aware that Docker relies on virtualization technology. On Windows, Docker can use either the Windows Subsystem for Linux (WSL) 2 or Hyper-V as a backend.

Docker with WSL2 backend

The current version of Docker Desktop only works on the 64-bit edition of Windows, whether you’re running Windows 10 or Windows 11. To run Docker with the WSL2 backend, your system must meet the following prerequisites:

  • Windows 10: Home/Pro 21H1 (build 19043) or higher, or Enterprise/Education 20H2 (build 19042) or higher
  • Windows 11: Home/Pro version 21H2 or higher, or Enterprise/Education version 21H2 or higher
  • WSL2 feature enabled
  • Linux kernel update package for WSL2
  • For WSL2, the following are the hardware requirements:
    • 64-bit CPU with second-level address translation (SLAT)
    • Hardware virtualization support, which must be enabled in BIOS/UEFI
    • 4 GB RAM

Docker with Hyper-V backend

To be able to run Docker with a Hyper-V backend and Windows containers, your system must meet the following prerequisites:

  • Windows 10: Pro 21H1 (build 19043) or higher, or Enterprise/Education 20H2 (build 19042) or higher
  • Windows 11: Pro/Enterprise/Education version 21H2 or higher
  • Optional Windows features for Hyper-V and Containers must be enabled

    Enable Hyper V and Containers windows features for Docker

    Enable Hyper V and Containers windows features for Docker

For Hyper-V, following are the hardware requirements:

  • 64-bit CPU with second-level address translation (SLAT)
  • Hardware virtualization support, which must be enabled in BIOS/UEFI
  • 4 GB RAM

In addition to the aforementioned requirements, if you want to run Docker in a Hyper-V guest VM, you need to enable nested virtualization by running this PowerShell command on the Hyper-V host:

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $True

Enable nested virtualization for a VM on Hyper V host using PowerShell

Enable nested virtualization for a VM on Hyper V host using PowerShell

Make sure your VM is powered off before running this command. Without nested virtualization support, Docker will not work in a VM, and you will receive the error message shown below.

Docker desktop cannot start An unexpected error occurred

Docker desktop cannot start An unexpected error occurred

Install Docker using the GUI

To install Docker Desktop in Windows using the GUI, follow these steps:

Download Docker Desktop. You will see a configuration screen, as shown in the screenshot:

Docker desktop configuration Use WSL 2 instead of Hyper V recommended

Docker desktop configuration Use WSL 2 instead of Hyper V recommended

To use Docker with the WSL 2 backend, check the box that says Use WSL 2 instead of Hyper-V (recommended). If you want to use Hyper-V instead, uncheck this option and click OK.

When the installation is complete, click the Close and Restart button to restart your computer.

Close Docker installer and restart the computer to complete installation

Close Docker installer and restart the computer to complete installation

After restarting, you will be able to run Docker Desktop using either a shortcut or a command prompt. If you did not install WSL 2 before installing Docker, you will receive the WSL 2 installation is incomplete error when you try to start Docker.

Docker desktop error WSL 2 installation is incomplete

Docker desktop error WSL 2 installation is incomplete

To fix this error, run the wsl —update command in an elevated PowerShell console, and restart your computer.

Installing WSL2 kernel updates to fix the WSL 2 installation is incomplete error

Installing WSL2 kernel updates to fix the WSL 2 installation is incomplete error

Install Docker using winget

Winget is a command-line package manager for modern versions of Windows, which works just like apt or DNF in Linux. If you have a little experience with package installation in Linux, you probably know that you usually just have to type a command and the package is ready for use. Well, winget does the exact same thing in Windows. All you need is Windows 10 1809 (build 17763) or Windows 11. To install Docker in Windows using winget, follow these steps:

Launch an elevated command prompt or PowerShell console, and type the following command:

winget install --exact --id Docker.DockerDesktop --accept-source-agreements --accept-package-agreements

Installing docker desktop in windows using winget

Installing docker desktop in windows using winget

The —exact (or -e in short) parameter tells winget to find the package using an exact match. The installation can take a while, but it is pretty much automatic, so there is nothing you need to do but wait.

When the command is finished, open a new command prompt (or PowerShell console) and run the docker —version command.

If you try to run docker —version in the same command prompt, you will likely see The term ‘docker’ is not recognized as the name of a cmdlet, function, script file, or operable program error, as shown in the screenshot.

The term docker is not recognized as the name of a cmdlet function script file or operable program

The term docker is not recognized as the name of a cmdlet function script file or operable program

This error occurs because your current command session (cmd or PowerShell) is still using the old environment variables. To be able to recognize the newly added Docker variable, you must reload the environment variables. Launching a new command session is the easiest way to load new variables.

Install Docker using PowerShell

To install Docker Desktop using PowerShell, follow these steps:

Download Docker Desktop.

Once the installer package is downloaded, open an elevated PowerShell console or Windows Terminal, and type the following command to start Docker installation:

Start-Process "D:Docker Desktop Installer.exe" -Wait -NoNewWindow "install --quiet --accept-license"

Installing Docker silently using PowerShell

Installing Docker silently using PowerShell

Make sure you adjust the installer path. The -Wait parameter causes the Start-Process cmdlet to wait for the new process to finish, and the -NoNewWindow parameter prevents the new process from opening in a new window. The —quiet switch is offered by Docker’s install command and suppresses the installation information. To see the information, skip this switch. Since we are using PowerShell, notice how —quiet and other flags are enclosed in quotes along with the install command—this is very important to avoid errors. By default, Docker will use the WSL 2 backend, but you could include the —backend=hyper-v flag to use the Hyper-V backend instead.

Once the above command is finished, you will see a shortcut for Docker Desktop on your desktop. Double-click the shortcut to launch Docker.

All of these installation methods are self-sufficient, so there is nothing additional you need to do. But you may still get an error message that says Docker Desktop – Access denied. You are not allowed to use Docker. You must be in the «docker-users» group.

Docker Desktop – Access denied. You are not allowed to use Docker. You must be in the docker users group

Docker Desktop – Access denied. You are not allowed to use Docker. You must be in the docker users group

If you get this error, run the following command in an elevated PowerShell console:

Add-LocalGroupMember -Group "docker-users" -Member $env:UserName -Verbose

Adding the current user to the docker users group using PowerShell

Adding the current user to the docker users group using PowerShell

Don’t forget to log off and log on again after running this command. If you want to delegate another user to run Docker Desktop, you can specify that username with the -Member parameter instead of $env:UserName.

Subscribe to 4sysops newsletter!

That was all for this guide. You just learned how to install Docker in Windows using the GUI, winget, and PowerShell. I am curious to know which method you prefer, and why.

Docker Desktop install on Windows Home.
I get the error notification «You must in the docker-users group.»

So you can go to compmgmt.msc to add yourself to the group,
but Windows Home doesnt have User Groups management like Windows Pro.

How can I do this for Windows Home?

asked Sep 24, 2020 at 0:57

bluesquare's user avatar

0

How can I do this for Windows Home?

Run the following command in an elevated command prompt.

net localgroup docker-users username /add

Source: Docker User Group

You can also run a PowerShell command within an elevated PowerShell prompt:

Add-LocalGroupMember -Group "docker-users" -Member "User"

answered Sep 24, 2020 at 3:25

Ramhound's user avatar

RamhoundRamhound

40.3k34 gold badges100 silver badges127 bronze badges

1

Понравилась статья? Поделить с друзьями:
  • You must always restore the drive that contains windows
  • You might need to start docker for windows
  • You have to install atk0100 driver windows 7
  • You don t have permission to access windows
  • You are empty скачать торрент механики для windows 10