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?
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.
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`)"
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.
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 .
Check out the dockercfg file, usually located at ~/.dockercfg
, this should contain login information and authentication tokens (while logged in).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With