Dockerauthgenerator is simple cli tool to generate a docker auth json file.
Dockerauthgenerator creates a json file which can be used to authenticate against a docker registry.
The output will be similar to this and will be printed on stdout:
{
"auths": {
"some.registry.com:5000": {
"auth": "bG9naW5OYW1lOnNvbWVQYXNzd29yZA=="
}
}
}
Most simple way is to provide the password as flag argument:
dockerauthgenerator -r some.registry.com:5000 -l loginName -p somePassword
If the password parameter is omitted, the password is read from terminal:
dockerauthgenerator -r some.registry.com:5000 -l loginName
You can also pipe the password from stdin:
echo somePassword | dockerauthgenerator -r some.registry.com:5000 -l loginName --s