Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there whoami analog for Docker?

Tags:

docker

It would be useful for me to get what user I logged in with the previous docker login. I didn't find anything like that in docker help but maybe there's something I don't know.

Is there anything like whoami in Docker command line client? For example, something like docker whoami. Maybe there's not official utility?

like image 402
starikovs Avatar asked Aug 03 '15 05:08

starikovs


People also ask

What is docker0 used for?

Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications.

What is Traefik Whoami?

Traefik Detects New Services and Creates the Route for You yml file and add the following at the end of your file. # ... whoami: # A container that exposes an API to show its IP address image: traefik/whoami labels: - "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)"

How can I tell what user is running as docker?

You can check the user that the application inside the container is configured to run as by inspecting the container for the . Config. User field, and if it's blank the default is uid 0 (root). But this doesn't tell you who ran the docker command that started the container.

What is the default user Do you login with docker?

The default user in a Dockerfile is the user of the parent image. For example, if your image is derived from an image that uses a non-root user example: swuser , then RUN commands in your Dockerfile will run as swuser .


1 Answers

Check out the dockercfg file, usually located at ~/.dockercfg, this should contain login information and authentication tokens (while logged in).

like image 162
Luke Exton Avatar answered Oct 12 '22 17:10

Luke Exton