Fix #13305 docker authentication broken caused by docker.py update

issue #13305 was introduced by docker.py update. this pull request is to address that issue.