Options (2)
-u, --usernamebooleanLog into a registry with a specific username (user will be prompted for a password)
Example:
docker login {{[-u|--username]}} {{username}}-p, --passwordbooleanLog into a registry with username and password
Example:
docker login {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} {{server}}Examples (4)
Interactively log into a registry
Log into a registry with a specific username (user will be prompted for a password)
docker login [-u|--username] usernameLog into a registry with username and password
docker login [-u|--username] username [-p|--password] password serverLog into a registry with password from `stdin`
echo "password" | docker login [-u|--username] username --password-stdinmade by @shridhargupta | data from tldr-pages