Add debug logging to dockerng.login

This can be used with debug logging enabled to troubleshoot which
registries this function is attempting to authenticate.
This commit is contained in:
Erik Johnson 2017-07-03 13:30:01 -05:00
parent 7160697123
commit bd27870a71

View file

@ -1899,6 +1899,10 @@ def login(*registries):
cmd = ['docker', 'login', '-u', username, '-p', password]
if registry.lower() != 'hub':
cmd.append(registry)
log.debug(
'Attempting to login to docker registry \'%s\' as user \'%s\'',
registry, username
)
login_cmd = __salt__['cmd.run_all'](
cmd,
python_shell=False,