Docker and user account with no admin privileges

Hello

I have the following situation: i need to prepare a “docker for desktop” deployment package for the developers. They will install it from the SCCM Software Center.

Our developers don’t have admin rights on their machines (unless absolutely necessary).

I installed Docker on my Windows test machine (using the install --quiet parameter). The machine has Windows 10 20H2 64 bit with all the updates installed.

I tried to launch the desktop GUI. It said that the install of the WSL2 support is incomplete and I have to install the kernel patch.

I did that, rebooted, tried to launch the GUI again. It worked fine this time.
Then I tried to run: docker run hello-world. Again, all fine.

Now I tried to test with the non-admin account.
Added the user to the local docker-users group.
Rebooted, just to be sure.
Logged in with the non-admin account.

When I tried to run:
docker run hello-world
I got an error saying:
docker run hello-world

docker: error during connect: This error may indicate that the docker daemon is not running.: Post “http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/create”: open //./pipe/docker_engine: The system cannot find the file specified.

See ‘docker run --help’.

What am I missing here?

The docker daemon was running. I checked.

Something else I noticed: if I run the Docker Desktop GUI from the admin account and leave that running, the non-admin user can use docker. The test (docker run hello-world) work just fine from the non-admin account.

This is because the named pipe that is used only allows administrators by default. Try adding docker-users group to the daemon.json with the group variable, as per this article. Configure and troubleshoot the Docker daemon | Docker Documentation

1 Like

Thanks for the reply.
I tried it but it doesn’t work.
I created the file daemon.json in C:\ProgramData\Docker\config. Added in it:
{
“group”: “docker-users”
}
Restarted the service (com.docker.service).
But the non-admin user, member of the docker-users group, cannot run
docker run hello-world
Same pipe error.

Hi, Andrei

You might need to put the daemon.json in your appdata folder instead for Linux containers. I don’t have the full path to hand unfortunately.

Good luck,

Thanks.
No pb., I’ll find the path and try again.