Can I run Docker Desktop on Windows without admin privileges?
Solution 1
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.
Solution 2
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.
Solution 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 ... :|
Solution 4
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 Files\Docker\Docker\Docker 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.
Solution 5
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
Related videos on Youtube
Ed Graham
I have been self-employed since 2006, working as an independent developer of .NET web applications using C# and SQL Server technologies. I have concentrated primarily on server-side development but also have experience of client-side coding (JavaScript) and design (CSS) and have been involved in client meetings and giving presentations to users. I am looking for a part-time or temporary full-time contract development role using .NET technologies in or around Cambridge or London, either office-based or working remotely.
Updated on July 09, 2022Comments
-
Ed Graham almost 2 years
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?
-
Ed Graham over 4 yearsExcellent - thank you! I have now become fully used to Admin rights over my machine, so am unlikely to try this: but if it does work it's clearly a better solution.
-
Kuba Šimonovský about 4 yearsNope. You can't run
Docker desktop.exe
without admin privileges. At least I can't. And what I see on the internet, you shouldn't be able to run it by default -
JamesQMurphy about 4 years@KubaŠimonovský What version are you on, and what error do you get when you run it? I also noticed that my user account, which is definitely not an admin account, is part of the
docker-users
account. I’ll remove my account from there and see what happens. -
JamesQMurphy about 4 years@KubaŠimonovský When I removed my account from the
docker-users
group, I was unable to launchDocker desktop.exe
, but the error was very specific: Docker Desktop - Access Denied You are not allowed to use Docker. You must be in the "docker-users" group. So I'm guessing that you have a different issue. -
Kuba Šimonovský about 4 yearsahh.. Unfortunately, I can't manipulate with groups and users because of company restrictions. So I can't try it... I have been using docker for a long time and I get used to it running it as admin
-
rbaleksandar about 4 yearsThe problem with admin rights is (beside the security issues of course) that every single application that you are using to work with a Docker container/image also needs to be with those rights. For example I had to start Visual Studio Code as admin and install all the stuff I needed (and had already installed but for a normal user) so that I can use it in any sane way with Docker.
-
Ed Graham about 4 yearsInteresting. My error (an event-log entry saying "Process requires elevated rights to run") was different to James's; I didn't get any indication at all about the
docker-users
group. Maybe they've added that error message to a newer version? -
Peter Pesch almost 4 yearsThanks! It worked! (I basically used the (sourcecode of the) tool to give the docker-users group sufficient access to that named pipe)
-
Ed Graham over 3 yearsThanks - that sounds like an even neater solution.
-
sjcaged over 3 yearsOnce you install it, you need to log out and log back in for your membership in the new .\docker-users group to be added to your login token.
-
Ed Graham over 3 yearsThanks Doug - that's a useful tip.
-
Andrea Mattioli about 3 yearsRight. You can enable Local User And Group Management in Windows 10 Home using lusrmgr.exe as I red here
-
zielot about 2 yearsNote the last instruction from @Simon Brady: "Log out and log back in for the changes to take effect". I did and this worked as advertised.
-
Juan Vilar about 2 yearsthis worked properly.
-
TC Tarım Köy İşleri almost 2 yearsYou saved my career xd