Hello , can you please help me the CLI command to find out the Docker User login info in the powershell

Hello to all,

i am trying to find out the user details of the docker repository logged in currently in the powershell , new to docker , trying some thing in linux command “whoami” or systeminfo | grep -i “Username” similar kind of
can some one please suggest.

Thank youl

1 Like

Hello.

From the terminal, you can see who is currently logged in to desktop with the following commands.

docker info | grep Username

Thank you.

Depending on the credential store, on some systems you could see the Username in the output of docker info, but grep probably wouldn’t work on Windows in Powershell.

The fact is that you could log in to many registries at the same time and as far as I know, Docker never showed other usernames then usernames on Docker Hub.

Different credential stores could show the users mapped to a registry. For example on macOS, my credential store is osxkeychain. I can run the following command to see my users stored in it:

docker-credential-osxkeychain list

When the credential store is “desktop”, I’m not sure what happens exactly, but you could check the Docker Hub user from the GUI. I don’t know about other credential stores on Windows, but the documentation mentions which one is available on which platform and also how a credential store should be implemented

https://docs.docker.com/reference/cli/docker/login/#credential-helper-protocol

I could not use the “get” subcommand on macOS, so it may be that it is not implemented even though the help shows that too.