jueves, 5 de septiembre de 2019

Allow access to the Docker Engine without admin rights on Windows

If you have been working with Docker on Windows, the following message is probably familiar:

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

As the message says, there are two likely reasons for this error: 1) Your Docker engine is not running and you need to start it. 2) You are not in an administrator / elevated session and therefore don’t have access to the engine. 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.

If you are not an administrator, you can manage to run docker without being one just only adding your current user to the docker-users group in Windows.

Steps:

  1. Hit Windows+R, type “lusrmgr.msc” into the Run box, and then hit Enter.
  2. Double clic docker-users group:
  3. Clic on Add:
  4. Add your current user to the group:
  5. Finally restart your computer. After your computer is restarted you will be able to run docker without admin rights.

No hay comentarios:

Publicar un comentario