docker的登陸信息存放在home目錄下的.docker文件夾下,查看linux
cat ~/.docker/config.json { "auths": { "gcyimgs.mydomain.com:50000": { "auth": "*************" } }, "HttpHeaders": { "User-Agent": "Docker-Client/18.09.6 (linux)" } }
能夠修改本地的host文件,使得gcyimgs.mydomain.com指向固定的ip地址。docker
sudo vim /etc/hosts # add local docker hub addr 192.168.0.10 gcyimgs.mydomain.com
而後重啓網絡,使得host生效json
sudo /etc/init.d/networking restart
再次docker loginvim
docker login -u[username] -p[password] gcyimgs.mydomain.com:50000